fix html special symbols in console output (#141)

pull/163/head
dima-ch 8 years ago committed by Thorsten von Eicken
parent ff51a16b98
commit a9321f421b
  1. 6
      html/console.js

@ -31,7 +31,11 @@ function updateText(resp) {
if (resp.start > el.textEnd) {
el.innerHTML = el.innerHTML.concat("\r\n<missing lines\r\n");
}
el.innerHTML = el.innerHTML.concat(resp.text);
el.innerHTML = el.innerHTML.concat(resp.text
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;'));
el.textEnd = resp.start + resp.len;
delay = 500;

Loading…
Cancel
Save