Open frdmn opened 5 years ago
The bad-words filter, only seems to respect roman characters.
I could imagine this is because the default regex is used in the library:
https://github.com/web-mech/badwords/blob/e15b99e41ebf794503148b80699914ebcf12f173/lib/badwords.js#L21
There is a mention of multi-lingual support with an example in the project README.md:
var filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g }); //multilingual support for word filtering
Go to admin UI → Message
Now set ...
True
test,example,Привет
Save configuration
Go to any channel and send a message with the content: test,example,Привет
All of the configured "bad words" should be censored:
frdmn: ***,*******,******
frdmn: ***,*******,Привет
Now that we have the Content Filter app for that, we should remove the functionality from the main code altogether.
Content Filter
We must make sure the Content Filter app can work with the non-roman characters.
Description:
The bad-words filter, only seems to respect roman characters.
I could imagine this is because the default regex is used in the library:
https://github.com/web-mech/badwords/blob/e15b99e41ebf794503148b80699914ebcf12f173/lib/badwords.js#L21
There is a mention of multi-lingual support with an example in the project README.md:
Steps to reproduce:
Go to admin UI → Message
Now set ...
True
test,example,Привет
Save configuration
Go to any channel and send a message with the content:
test,example,Привет
Expected behavior:
All of the configured "bad words" should be censored:
Actual behavior:
Server Setup Information:
Additional context