You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey,
I think I found a possible bug: Defining a bad word in a filter list with accented characters, will not filter the word if you write it exactly the same, but only when you normalize the characters first.
Example:
Define the filter with a custom bad word: const filter = new Filter({list: ["wörd"]});
Filtering the bad word will result in a false negative: filter.isUnclean("wörd") = false
Filtering with normalized characters will result in a false positive: filter.isUnclean("word") = true
Expected behavior:
filter.isUnclean("wörd") = true
filter.isUnclean("word") = false
And when defining a bad word without accents:
const filter = new Filter({list: ["word"]});
filter.isUnclean("word") = true
filter.isUnclean("wörd") = true
The text was updated successfully, but these errors were encountered:
This filter is designed for only English. There are very little characters with accents that need to be censored out. In that case, using the non accented version of the filter would make things a lot easier. It's expected that when you load in the words it's already normalized.
Hey,
I think I found a possible bug: Defining a bad word in a filter list with accented characters, will not filter the word if you write it exactly the same, but only when you normalize the characters first.
Example:
const filter = new Filter({list: ["wörd"]});
filter.isUnclean("wörd") = false
filter.isUnclean("word") = true
Expected behavior:
filter.isUnclean("wörd") = true
filter.isUnclean("word") = false
const filter = new Filter({list: ["word"]});
filter.isUnclean("word") = true
filter.isUnclean("wörd") = true
The text was updated successfully, but these errors were encountered: