Explorar o código

Escape HTML for error messages being sent to alert

j433866 %!s(int64=6) %!d(string=hai) anos
pai
achega
e35ef8f39b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/web/App.mjs

+ 1 - 1
src/web/App.mjs

@@ -108,7 +108,7 @@ class App {
     handleError(err, logToConsole) {
         if (logToConsole) log.error(err);
         const msg = err.displayStr || err.toString();
-        this.alert(msg, this.options.errorTimeout, !this.options.showErrors);
+        this.alert(Utils.escapeHtml(msg), this.options.errorTimeout, !this.options.showErrors);
     }