RocketChat / RocketChat/Rocket.Chat
Bad-words filter only works for roman character
Open
@sampaiodiego is already working on this.
Since Mar 19, 2020.
feat: i18n
triaged
type: improvement
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
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:
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
Steps to reproduce:
-
Go to admin UI → Message
-
Now set ...
- "Allow Message bad words filtering" to
True - "Add Bad Words to the Blacklist" to
test,example,Привет
- "Allow Message bad words filtering" to
-
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:
frdmn: ***,*******,******
Actual behavior:
frdmn: ***,*******,Привет
Server Setup Information:
- Version of Rocket.Chat Server: 0.70.4
- Operating System: Cloud
- Deployment Method: Cloud
- Number of Running Instances: Cloud
- DB Replicaset Oplog: Cloud
- NodeJS Version: Cloud
- MongoDB Version: Cloud
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.