Skip to content
This repository was archived by the owner on Dec 19, 2020. It is now read-only.

Whitelist should check the input text #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fredxinfan
Copy link

The whitelist should be checking the input text instead of an item from the blacklist for the following reasons:

  1. There is no point to have the same word both in blacklist and whitelist. If the word shouldn't be considered as profane, simply remove it from the blacklist.
  2. By checking the input text in the whitelist will make Regex working better in the blacklist, e.g. "suckdicks" should be profane, but "DickSmith"(An Australian brand) should not be. So if we have "\wdicks\w" in the blacklist and "DickSmith" in the whitelist, we can easily by pass the check for "DickSmith" without miss checking any profane words contain "dicks".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant