Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASCII Character code not working #7

Open
delacruzjames opened this issue Mar 13, 2014 · 3 comments
Open

ASCII Character code not working #7

delacruzjames opened this issue Mar 13, 2014 · 3 comments

Comments

@delacruzjames
Copy link

[
["@$$f@ce"],
["@$$h0le"],
["@$$he@d"],
["@$$hole"],
["@$$hols"],
]

@MonrealRyan
Copy link

+1

@2gen
Copy link

2gen commented Nov 3, 2015

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');

@ChaseFlorell
Copy link
Owner

@2gen would you drop a PR on this? I'd be happy to accept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants