summaryrefslogtreecommitdiffstats
path: root/web/index.html
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2018-09-17 14:20:57 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2018-09-17 14:20:57 +0300
commitff1b8161bfa4bd684ea9a0edfcd86d8dcd939005 (patch)
tree271482ad1686af238704331e4495a7619e3b4050 /web/index.html
parent7b75698d7a951dda2fdd73f33546424330ac375d (diff)
fixed issues identified by lgtm
Diffstat (limited to 'web/index.html')
-rw-r--r--web/index.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/index.html b/web/index.html
index 2a7206949a..24d821ef6c 100644
--- a/web/index.html
+++ b/web/index.html
@@ -580,7 +580,7 @@
// control the welcome modal and analytics
var this_is_demo = null;
- function xssFix(s) {
+ function escapeUserInputXss(s) {
return s.toString().replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
@@ -1112,7 +1112,7 @@
function netdataURL(url, forReload) {
if(typeof url === 'undefined')
- url = xssFix(document.location.toString());
+ url = document.location.toString();
if(url.indexOf('#') !== -1)
url = url.substring(0, url.indexOf('#'));
@@ -1121,7 +1121,7 @@
// console.log('netdataURL: ' + url + hash);
- return url + hash;
+ return escapeUserInputXss(url + hash);
}
function netdataReload(url) {