jQuery.ProfanityFilter
jQuery.ProfanityFilter copied to clipboard
Outsmart the l33t.
The filter should be smart enough to find profanity that uses 0 (zeros) to represent O's. 3's for e's, and whatever other character replacements are common for bypass filters like this.
You're absolutely correct. That's why you can add your custom phrases to your json phrases file. For performance reasons, I'd prefer using array matching over tons of regex matching (but hey, that's just me). The implementation that I needed this for is an "opt in" filter. This means that in my particular application, there shouldn't be any "bypass" attempts.
Feel free to submit a pull request with the addition of regex matching. Just be sure to make it "optional" within the config.
If I can get time, I might add this feature. I'm just super busy right now.
My boss was actually noting that this didn't have regex...so that would be awesome to have added!
I would love to help contribute!
I would love the help! I haven't touched javascript in several years as I'm working on Xamarin mobile apps. I'll accept any PR you can send :)