escape useragent before displaying

This commit is contained in:
John McLear 2014-10-06 14:18:54 +01:00
parent 64c89613a1
commit f0c12d3884
1 changed files with 1 additions and 1 deletions

View File

@ -520,7 +520,7 @@ function setupGlobalExceptionHandler() {
$("#editorloadingbox").css("padding", "10px");
$("#editorloadingbox").css("padding-top", "45px");
$("#editorloadingbox").html("<div style='text-align:left;color:red;font-size:16px;'><b>An error occured</b><br>The error was reported with the following id: '" + errorId + "'<br><br><span style='color:black;font-weight:bold;font-size:16px'>Please press and hold Ctrl and press F5 to reload this page, if the problem persists please send this error message to your webmaster: </span><div style='color:black;font-size:14px'>'"
+ "ErrorId: " + errorId + "<br>URL: " + window.location.href + "<br>UserAgent: " + navigator.userAgent + "<br>" + msg + " in " + url + " at line " + linenumber + "'</div></div>");
+ "ErrorId: " + errorId + "<br>URL: " + window.location.href + "<br>UserAgent: " + padutils.escapeHtml(navigator.userAgent) + "<br>" + msg + " in " + url + " at line " + linenumber + "'</div></div>");
}
//send javascript errors to the server