diff options
Diffstat (limited to 'src/xss/InjectionChecker.js')
-rw-r--r-- | src/xss/InjectionChecker.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/xss/InjectionChecker.js b/src/xss/InjectionChecker.js index 52cba27..a09938b 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); }, |