badwords icon indicating copy to clipboard operation
badwords copied to clipboard

Can not filter \n\n\n\n

Open sojs-coder opened this issue 2 years ago • 1 comments

I am allowing users to send multiple lines in a chat. When a user sends nothing but empty lines, the filter breaks, and throws Uncaught TypeError: Cannot read properties of null (reading '0') at Filter.clean.

sojs-coder avatar Jun 13 '23 22:06 sojs-coder

More broadly, this happens when the characters are all whitespace (eg ) or the string is empty.

Eiim avatar Aug 16 '24 22:08 Eiim