Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this questionI'm looking for a pre-made content/text filter plugin that checks (as the user types in a textbox) the typed words against a list of inappropriate words. I then want to provide some sort of alert box or flag notifying the user that this language is unacceptable...
Again, I'm looking for the easy-way-out, an existing content filter plugin
Here's a potential solution, though I don't think it's free: http://www.webpurify.com/profanity/filter/codesample.jquery.php
I developed my own content filter using AJAX and a blacklist of over 450 bad words. When the submit button is pressed, the entered string gets sent to a Visual FoxPro Procedure that looks for any word within the blacklist in the entered string. If it is found and error is word is saved within a return string and the *'s replace the bad word in the original string. Both strings are then sent back to the web page (in real-time) and the return string displays an alert box explaining: "The following profanity will not be tolerated: [bad word]" and the original string is replaced with the bad word replaced with *'s. (I know this explanation is convoluted but it works on my end....and thats all that matters).
精彩评论