1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-10-27 20:34:20 +00:00

escape html tags in log output

While normally this isn't enough to prevent XSS, this output will only
appear in the body of a <pre>, and anyway the scripts are semi-privileged
This commit is contained in:
Oliver Giles 2017-12-21 08:46:00 +02:00
parent 3129f0e73b
commit 1f23ec5fb2

View File

@ -430,7 +430,7 @@ const Run = function() {
};
var firstLog = false;
var logHandler = function(vm, d) {
state.log += d;
state.log += d.replace(/</g,'&lt;').replace(/>/g,'&gt;');
vm.$forceUpdate();
if (!firstLog) {
firstLog = true;