summaryrefslogtreecommitdiff
path: root/src/xss/InjectionChecker.js
diff options
context:
space:
mode:
authorhackademix2019-02-01 01:17:58 +0100
committerhackademix2019-02-01 01:17:58 +0100
commit0878ad2b0a0d3af5db66cc6a4f7d882e17a13365 (patch)
tree877ee5d84d5cb33e6e4091c2418afdb11731ceee /src/xss/InjectionChecker.js
parentd152a5387197e37bbb9838392f454f041e2478ea (diff)
downloadnoscript-0878ad2b0a0d3af5db66cc6a4f7d882e17a13365.tar.gz
noscript-0878ad2b0a0d3af5db66cc6a4f7d882e17a13365.tar.xz
noscript-0878ad2b0a0d3af5db66cc6a4f7d882e17a13365.zip
Remove usage of non-standard Array methods.
Diffstat (limited to 'src/xss/InjectionChecker.js')
-rw-r--r--src/xss/InjectionChecker.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/xss/InjectionChecker.js b/src/xss/InjectionChecker.js
index 181ea49..45ef29b 100644
--- a/src/xss/InjectionChecker.js
+++ b/src/xss/InjectionChecker.js
@@ -107,11 +107,10 @@ XSS.InjectionChecker = (async () => {
var bs = {
nq: new RegExp("[" + def + "]")
};
- Array.forEach("'\"`", // special treatment for quotes
- function(c) {
- bs[c] = new RegExp("[" + def + c + "]");
- }
- );
+ for (let c of ['"', '"', '`']) {
+ // special treatment for quotes
+ bs[c] = new RegExp("[" + def + c + "]");
+ }
delete this.breakStops;
return (this.breakStops = bs);
},