Re: Swear filter ideas
| From: | Colin Guthrie | Date: | Thu, 28 Jun 2007 14:46:42 +0000 |
| Subject: | Re: Swear filter ideas | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257921@lists.php.net to get a copy of this message | ||
Daniel Brown wrote:
> On 6/28/07, Colin Guthrie <gmane@colin.guthr.ie> wrote:
>> We implemented a simple key => value array map of rude words to
>> "sanitised" equivalents:
>>
>> e.g. breast => sandwich, felch => retrieve etc. etc.
>
> "Today we have Chicken Marsala over angel hair pasta, which is a
> chicken sandwich braised in Marsala wine...."
Indeed. Your word list would have to allow certain words that could be
used in genuine text. Other words which I wont post here would never be
used in general conversation ;)
> "Please keep me asandwich of the events as they transpire."
This one wouldn't happen due to the stop words regexp.
>> The added bonus is that you can flip the key/values in your array and
>> turn perfectly nice sentences into torrents of abuse ;)
>
> "Sandy was a golden felcher...."
Exactly! Awesome eh!?! Hours of fun!
Col.