Anders429 / word_filter

A Word Filter for filtering text.
Apache License 2.0
1 stars 0 forks source link

Repetition causes false positives within exceptions #48

Closed Anders429 closed 3 years ago

Anders429 commented 3 years ago

If there is a word contained within another exception, having a superstring of the word but substring of the exception as input gives a false positive, resulting in a larger range being captured.

For example, a word "foo" with an exception "foobar" results in "foob" being completely censored. This is because the character "b" repeats back to the previous state, which is a Word state.

Anders429 commented 3 years ago

Encountered this on the accepting_states branch. This was a direct consequence of trying to resolve #41. This will be resolved when that branch is merged.