Adding 'scunthorpe' to allow list does not prevent it being considered a profanity
willemaster opened this issue · 2 comments
willemaster commented
It looks like the ContainsProfanity() method will consider 'scunthorpe' a profanity even if 'scunthorpe' is on the allow list, because it contains a profanity within itself.
The behaviour we require is to allow such words to be exempted, if they are on the allow list, even if a substring of the word being checked is a profanity.
I can submit a PR for this?
stephenhaunts commented
Hi, use IsProfanity instead to get the desired behaviour. IsProfanity will specifically solve the Scunthorpe problem.
ContainsProfanity was added last week as a PR for a specific use-case or another company.
stephenhaunts commented
From the documentation:
var filter = new ProfanityFilter();
Assert.IsTrue(filter.IsProfanity("@rsehole"));