Open jagermesh opened 4 years ago
I have the same problem, is there a way to match whole words only? Thanks.
I saw that you can pass a second argument to censorString and it will match whole words only:
public function censorString($string, $fullWords = false) // <-- defaults to false, you can put true to match whole words
Yeah, but this will start showing other words which are in 99% cases must be hidden. For example f**k must be considered as bad either as part of other word or as separate word, so regardless of the $fullWords true or false.
same problem with word asshole
if we set fullwords
to true
, word classroom
is passed but then word asshole
is also passed.
I would still set fullwords
to true
then add asshole
to the dictionary so it will be filtered as a fullword.