Profanity Filter - Not Working on Titles/Topic Subject Line

(Bcguy) #1

We’ve been having a problem recently with people posting profanity in the subject line/ topic title. It seems like the profanity filter should be working on that text also…

(Jeff Atwood) #2

So tempted to edit this title…

(Seth) #3

I am having the same problem. I’m not trying to censor profanity but prevent this phone number this spammer keeps posting on our forum from being used. I am using the Akismet plugin but some amount of spam still gets through every night. Since the spammer has only used two different phone numbers in the entire time they have been spamming, I figured censored words would be an easy way to set them back. However, they just keep posting all of the information in the title of the topic and fill up the body with just random characters.

(Jeff Atwood) #4

You’re using the wrong approach – censored words is not to prevent spam. Try the official Akismet plugin.

(Stephanie) #8

Regardless of the spam issues, should profanity be showing up in titles if it’s filtered in the actual posts?

(Alan Tan) #9

@AmiAthena It shouldn’t. I had a brief look into the code base and this is because the censored words preprocessor is only applied to the body of the posts.

(Alan Tan) #10

PR submitted

(Alan Tan) #11

@zogstrip Lets close this? :smile:

(Alan Tan) #14

I just realized my fix was too simple. The censored words are still appearing in the title meta tag, links to the topic. I think the better way is to add a validation that disallow any censored words in the title. Any thoughts?

(Kane York) #15

Make sure that it only triggers when the title is changed, otherwise scheduled tasks that touch old topics containing disallowed words will raise an exception.

(Jeff Atwood) #16

Yes, we should do this, bearing in mind @riking’s caveat…

(Alan Tan) #17

Finally got around to adding a validation on the topic tittle

(Alan Tan) #18