web-mech / badwords

A javascript filter for badwords
MIT License
618 stars 325 forks source link

Why is "god" triggering the profanity filter? #87

Open mfxuus opened 3 years ago

mfxuus commented 3 years ago

I only see "God-damned" in the language list, but using god alone was also triggering the check. Any ideas what could be going on? Thanks!

alenros commented 3 years ago

This is not intended as a statement. there's a problem with dashes: see https://github.com/web-mech/badwords/issues/82

mfxuus commented 3 years ago

AH... I think "god" is actually from package badwords-list, since I see that package imported, and "god" is in the list over there... Not sure though.

cristian1980 commented 2 years ago

"god" is not in the bad word list but "God-damned" is, see here https://github.com/web-mech/badwords/blob/master/lib/lang.json

A workaround would be to remove "god" form the bad word list before doing the filter, for example:

            languageFilter.removeWords("god");
            console.log(languageFilter.clean("Now tell me there is God watching over us!"));

This is a workaround, not a proper fix.

Falling10fruit commented 2 years ago

I have never seen so many bad words in my life meshed into one sitting.

Falling10fruit commented 2 years ago

Maybe that's why Scratch didn't allow us to make a bad word filter