Open delacruzjames opened 10 years ago
+1
Got a fix for this.
Add the following function:
function escapeRegExp(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
}
Find the regex that is doing the string replace, I used the non-minified version and replace it with the following (around line 161):
re = new RegExp('\\b' + escapeRegExp(badWords[i]) + '\\b', 'gi');
@2gen would you drop a PR on this? I'd be happy to accept.
[ ["@$$f@ce"], ["@$$h0le"], ["@$$he@d"], ["@$$hole"], ["@$$hols"], ]