Why is [^ ...] in / RegExp / not protected?
1 answer
The problem is with the character [^ ...] you resolve practically in your regex and jshint detects a security threat.
This is what the jslint docs says about [^ ...]:
true if. and [^ ...] must be allowed in RegExp literals. They match more material than one would expect, allowing attackers to obfuscate the Applications. These forms should not be used when checking in secure applications.
+2
source to share