Merge pull request #569 from evandroforks/limit_error_message_size
Also limit the size of the error message
This commit is contained in:
commit
385dbf88c3
@ -40,11 +40,12 @@ function _updateQA(html, fadeTime, onupdate, onshown) {
|
||||
qa.html(html);
|
||||
} catch (err) {
|
||||
qa.html(
|
||||
"Invalid HTML on card: " +
|
||||
err +
|
||||
("\n" + err.stack)
|
||||
.substring(0, 2000)
|
||||
.replace(/\n/g, "<br />")
|
||||
(
|
||||
`Invalid HTML on card: ${String(err).substring(
|
||||
0,
|
||||
2000
|
||||
)}\n` + String(err.stack).substring(0, 2000)
|
||||
).replace(/\n/g, "<br />")
|
||||
);
|
||||
}
|
||||
_runHook(onUpdateHook);
|
||||
|
Loading…
Reference in New Issue
Block a user