For a website that enters data from children, we need to filter out any mischievous / bad words that they use when they enter their comments on the website (PHP works).
Comments is a free field and users can enter any comments they want. The solution I can think of is to have a list of words, for example BLACKLIST: bad, bad, word, woord, craap, craaaap, (we can fill it with all the blacklisted words).
Then, when the form is saved, we can view the list and, if any of the words is present, we will not allow the comment to be saved.
BUT THE EXAMPLE with this method is that they can be dispensed by adding letters to the words to skip the EG filter: shiiiiit
Let me know what you think is the best way to create a filter for these words.
source share