Open CookedApps opened 2 years ago
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