replacing inappropriate content?

Permalink
I found a file that has a set of replacement words and phrases for inappropriate content (curse words) but it doesn't seem to actually work. Is this something I need to switch on or somehow code?

spjuphigh
 
mkly replied on at Permalink Reply
mkly
Someone else will likely correct me on this, but I had thought that this only applied to the 'concrete/validation/banned_words.php' helper functions typically used in validating form input.
spjuphigh replied on at Permalink Reply
spjuphigh
That's exactly what I thought, but it doesn't work there either. I tested it by inputting several banned words into a contact form, a content block, and several other places, but the word still shows up.
mkly replied on at Permalink Reply
mkly
Oh sorry. I meant that it is a valiation helper. It's when you write code. The Form Block does not appear to make use of it, although I'm not positive about that. I just grepped the Form Block source real quick for 'banned'.

Like if you were writing an addon in your controller function that validates/saves the form data.
$err = Loader::helper('validation/error');
$banned_words = Loader::helper('validation/banned_words');
if($banned_words->isBannedWord($this->post('some_field')) {
  $err->add($this->post('some_field') . t(' contains a banned word'));
}


Does that make a little more sense?
spjuphigh replied on at Permalink Reply
spjuphigh
I'm sure it does - to someone who writes PHP (which I don't). My hope/understanding was that it was a built-in feature. I guess not.
spjuphigh replied on at Permalink Reply
spjuphigh
THANK YOU THOUGH!!
mkly replied on at Permalink Reply
mkly
lol... sorry I couldn't be more help.
GregJoyce replied on at Permalink Reply
GregJoyce
It doesn't look like the banned words actually works with any of the core blocks that take content from external users, like the form and guestbook blocks. Off the top of my head, I know that the Discussion add-on does use the list.