No, I don't want to censor what people are querying, I want to censor
the searches I display.
I display the last 5 queries entered in the search box on my website.
I do not want to display offensive terms - such as, the '7 words you
can't say on TV. I am already censoring the words themselves, but I
want to censor terms that contain those words.
In case you need a reason why: the webpage is on the website of a
major University. I want to provide students with search topic tips,
but do not want to display any offensive words.
This is what I am doing:
censor = get_censor # returns an array of offensive words
How do I extend this to filter out queries that contain the censored
terms, I am thinking of MYSQL pattern matching with like but am not
sure how to do it.
Thanks in advance, K