This is a very simple filter showing how you can remove certain content from the page before it's displayed to the user.

This filter is not really very useful, I'm afraid, as it knows only two dirty words.

Parameters#

None.

Example#

None.

--- Update 10/10/2006:

Hi, I've attached a small patch, so this profanity filter takes the forbidden words from WEB-INF/profanity.txt, at a rate of one forbidden word per line rather than taking them from a String[].

Additionally, it also makes the search of nasty words case unsensitive, so you don't have to worry about all possible case-combinations of a given word.

Hope someone finds this useful.

Regards,
-- JP

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
txt
patch_profanity_filter.txt 5.1 kB 1 10-Oct-2006 12:37 213.96.121.208
« This page (revision-7) was last changed on 14-Apr-2008 19:12 by 84.78.34.50