• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Censored words should not be searchable

AzzidReign

Well-known member
#1
With all the adsense TOS crack downs, we've been adding a lot of words to the censor list. Google Adsense's TOS states that you can't even have "adult keywords" on your site, as that is a violation of their policy. I've blocked all bots from using the search but somehow, a violation came up and it is showing a search page. The term is on our censor list, but you can still see the posts that have "used" this term. Apparently you can still search the term even though it comes up as ****.

I suggest making all censored terms NOT searchable. This will help with adsense TOS and I don't think users should be searching for terms you've censored out.
 

Mike

XenForo developer
Staff member
#2
In general, this is already done, at least for the *** case.
Code:
$input['keywords'] = XenForo_Helper_String::censorString($input['keywords'], null, ''); // don't allow searching of censored stuff
This code should actually remove anything that gets starred out.
 

AzzidReign

Well-known member
#3
In general, this is already done, at least for the *** case.
Code:
$input['keywords'] = XenForo_Helper_String::censorString($input['keywords'], null, ''); // don't allow searching of censored stuff
This code should actually remove anything that gets starred out.
Where would I add that?
 

Mike

XenForo developer
Staff member
#4
I mean it's already there. I tested it locally and couldn't reproduce the issue. You should be able to confirm it by just searching for a censored term -- it will act as if you haven't entered a query. The term is simply ignored. (You can check it here by entering a term that would be obviously censored... :))
 

Brogan

XenForo moderator
Staff member
#6
The issue is, if you use a root word in the censor and don't specify an exact match, searching for **** will get no hits, but searching for ****ing will return hits.
 

Mike

XenForo developer
Staff member
#7
@BamaStangGuy - had to delete that post because of the word in the image.

It will return hits, but it's actually searching for "ing" in that example (on the default FT settings, you won't be able to search for that).
 
#8
I mean it's already there. I tested it locally and couldn't reproduce the issue. You should be able to confirm it by just searching for a censored term -- it will act as if you haven't entered a query. The term is simply ignored. (You can check it here by entering a term that would be obviously censored... :))
I tried confirming by searching for the censored term, still not working. Any other suggestions? Thanks.