XF 2.2 Cannot censor words or phrases containing an apostrophe

DocStone

Member
OK, have a bit of a strange problem on our Xenforo forum (v2.2.9)

I add the following phrase to the censor list - means hes away - and it if anyone types "means hes away" it gets censored correctly. If however I add in a second version of the phrase using an apostrophe showing omission - means he's away - then the ones who use correct punctuation and type "means he's away" do not get censored.

It doesn't matter if I use a wildcard to replace the apostrophe, or if I use the wildcard to remove "he's" completely, the version of the phrase containing the apostrophe slips past the censor.

Does anyone have any ideas as to why this is happening, and more importantly, how to fix the bloody thing?
 
As far as I know this has something to do with certain strings also used in commands in php and/or mysql.

If I'm not mistaken, the solution is to put a backslash in front of it. So then the solution would be to put it as:
he\'s

Ah... found some tutorial about it.
 
OK, so I seem to have found the issue.

This apostrophe: ’

Works with the censor. So the phrase with that apostrophe works, and the word censor changes the phrase.

This apostrophe: '

Does not. This type of apostrophe seems to throw the censor for a wobbler, and it is not recognised.

The bottom one is what my keyboard, using Window 11, English UK setting outputs when typing the apostrophe, the top one seems to be the majority of users apostrophes (90% UK layout, but probably 50/50 between Win 11 and mobile device).
 
I know, but the second one does not work when input into the censor list. It seems to confuse it somehow.

So in your picture above, the first entry works, and censors that exact text on the forum, however the second entry does not work, and will not replace the exact text on the forum.
 
I have no doubt it does, just doesn't on our installation. Seems the majority of people use the former, working apostrophe so I am happy to have identified the issue at my end so we can deal with the hundreds of posters that think it is absolutely hilarious to post that phrase in every thread regarding a player :D
 
Good morning, we have a problem with caps caracter, becouse in our Country a word starting with cap is different then the same word write normally. for example:

Negro: is a Surname.
negro: is a racist adjective to define black people.

The censor option do not reckognize the difference between normal and caps character.

How can we put a rule to censor only negro and not Negro?
any suggestion will be appreciated, thanks.
 
Top Bottom