views:

89

answers:

2

I'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

A: 

Here's a potential solution, though I don't think it's free: http://www.webpurify.com/profanity/filter/codesample.jquery.php

KatieK
A: 

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).

sadmicrowave
Keep in mind that JS solutions can easily be circumvented. You need to filter the text again server-side after it has been submitted.
RoToRa