Re: Swear word substitution
| From: | Craig Donnelly | Date: | Tue, 19 Nov 2002 10:32:46 +0000 |
| Subject: | Re: Swear word substitution | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125051@lists.php.net to get a copy of this message | ||
http://www.evilwalrus.com/viewcode/560.php
"Cj" <newsgroupcontact@seseaz.org.uk> wrote in message
news:20021114155439.41215.qmail@pb1.pair.com...
> I'm posting this again as i got a mail saying
>
> Trend SMEX Content Filter has detected sensitive content.
>
> Place = php-general@lists.php.net; ;
> Sender = CJ
> Subject = [PHP] Swear word substitution
> Delivery Time = November 14, 2002 (Thursday) 23:40:23
> Policy = Dirty Words
> Action on this mail = Delete message
>
> Warning message from administrator:
> Sender, Content filter has detected a sensitive e-mail.
>
> There was not a swear word in my original post but there was a word that
> contained a swear word but is itself not a swear word. The word is Scu
>
> n
>
> thorpe
>
> and I need a script to allow wordslike this but remove proper swearwords.
>
> I've got a mysql based website with a php scripted fromt end. I want to
> parse the output the php scripts get from the database before "printing it
> as html" for swear words and substitute these for more acceptable words
(on
> a word for word basis). I need to do it this way as I want to keep the
> original posts in their "rude" form in case I need evidence for misuse of
> the site. I need to be able to check for words separated by non alpha
> characters in case people get clever and write obscenities separated w i t
h
> s p a c e s or with o_t_h_e_r characters or even new
> l
> i
> n
> e
> s
> or wordsruntogetherintoonelongword.
> I also want a list of permitted words that contain swearwords such as
> "Sc%%thorpe" which won't get changed.
>
> Has anybody done this? I have a feeling that there is a 1 line regular
> expression out there that will do this nicely.
>
> Any help appreciated
>
> Feeling rusty at coding...
>
> CJ
>
>