# Can't add bad words to blacklist

**URL:** <https://forums.rocket.chat/t/cant-add-bad-words-to-blacklist/15363>\
**Category:** Community Support\
**Created:** [November 15, 2022, 5:48pm UTC](https://forums.rocket.chat/t/cant-add-bad-words-to-blacklist/15363 "2022-11-15T17:48:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![euanlgbtcenters](https://avatars.discourse-cdn.com/v4/letter/e/ecc23a/32.png) [@euanlgbtcenters](https://forums.rocket.chat/u/euanlgbtcenters)\
**Post date:** [November 15, 2022, 5:48pm UTC](https://forums.rocket.chat/t/cant-add-bad-words-to-blacklist/15363/1 "2022-11-15T17:48:05Z")

</div>

### Description

Hello!

I am not a programmer or engineer so please forgive my lack of understanding or knowledge. I’m part of a nonprofit org that uses Rocket Chat server to host support chat rooms for youth. I’m trying to add bad words to the blacklist under Admin-Settings-Message but it seems to be not working. I added a bunch of bad words, separated by comma (example: fuck, fucking, shit), and saved changes. I tried testing it in both private and public channel using a test user account but the words still appear unfiltered. This used to work a while ago, the words used to have \* as filter so it would show up at as \*\*\*\*. Am I doing something wrong? Is there another setting that I need to turn on/off? Any guidance would be greatly appreciated!

Thank you.

### Server Setup Information

- Version of Rocket.Chat Server: 5.2.0
- Operating System: Windows 10
- Deployment Method: 
- Number of Running Instances:
- DB Replicaset Oplog:
- NodeJS Version: 14.19.3
- MongoDB Version: 4.2.8
- Proxy: 
- Firewalls involved:

### Any additional Information

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [November 18, 2022, 6:57pm UTC](https://forums.rocket.chat/t/cant-add-bad-words-to-blacklist/15363/2 "2022-11-18T18:57:25Z")

</div>

hi @euanlgbtcenters !

Thanks for reaching out!

Indeed, this is a bug. We are refactoring the message parser, the component responsible to show - or not - messages.

if you go, now, to your preferences in Avatar \> Preferences \> Global and Activate “Use legacy message template”

You will see that it will works properly.

I will open up an [issue for that in our Repository](https://github.com/RocketChat/Rocket.Chat/issues)

Thanks!

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [November 18, 2022, 7:11pm UTC](https://forums.rocket.chat/t/cant-add-bad-words-to-blacklist/15363/3 "2022-11-18T19:11:08Z")

</div>

Issue opened:

> <https://github.com/RocketChat/Rocket.Chat/issues/27298>
>
> \### Description:
> 
> When you set up bad words to be filtered, it will change for… \*\*\* on notifications, but not on channel.
> 
> \### Steps to reproduce:
> 
> 1. Enable \`WORKSPACE \> SETTINGS \> MESSAGE \> Allow Message bad words filtering\`
> 2. \`WORKSPACE \> SETTINGS \> MESSAGE \> Add Bad Words to the Blacklist\` to onebadword,otherbadword
> 3. Send a message to a channel: onebadword followed by otherbadword
> 
> \### Expected behavior (this is what happens if using legacy message parser):
> 
> !\[image\](https://user-images.githubusercontent.com/1761174/202783265-da4927dd-9fc7-4d5e-8623-52a9af0dd2fd.png)
> 
> \### Actual behavior:
> 
> !\[image\](https://user-images.githubusercontent.com/1761174/202783388-5b4de3df-3dc7-490f-98ac-37d830322e40.png)
> 
> \### Server Setup Information:
> 
> \- Version of Rocket.Chat Server: 5.3.1
> \- Operating System: Linux
> \- Deployment Method: docker
> \- Number of Running Instances: 1
> \- DB Replicaset Oplog: 
> \- NodeJS Version: 
> \- MongoDB Version:
> 
> \### Client Setup Information
> 
> \- Desktop App or Browser Version:
> \- Operating System:
> 
> \### Additional context
> 
> 
> 
> \### Relevant logs:

---

<div class="post-metadata">

**Author:** ![euanlgbtcenters](https://avatars.discourse-cdn.com/v4/letter/e/ecc23a/32.png) [@euanlgbtcenters](https://forums.rocket.chat/u/euanlgbtcenters)\
**Post date:** [November 18, 2022, 7:26pm UTC](https://forums.rocket.chat/t/cant-add-bad-words-to-blacklist/15363/4 "2022-11-18T19:26:50Z")

</div>

Hi @dudanogueira

Thanks for the update. I toggled ‘use legacy message template’ and it worked. However, I saw this statement below the toggle: ‘This is a deprecated feature. It may not work as expected and will not get new updates’. Would this cause any issue?

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [November 18, 2022, 7:29pm UTC](https://forums.rocket.chat/t/cant-add-bad-words-to-blacklist/15363/5 "2022-11-18T19:29:03Z")

</div>

Hi! it will solve your situation for now (notice that it will only change for the current user)

You are enabling the legacy message parser. So soon we should fix all issues we are finding on the new message parser.

However, whatever issues we find on the legacy parser, we will not be fixing, as we are moving forward with the new parser.

You should be fine 🙂

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [December 3, 2022, 4:29pm UTC](https://forums.rocket.chat/t/cant-add-bad-words-to-blacklist/15363/6 "2022-12-03T16:29:19Z")

</div>

Hi @euanlgbtcenters !!

Because of your finding, we were able to tackle this issue together!

> <https://github.com/RocketChat/Rocket.Chat/pull/27368>
>
> \<!-- Your Pull Request name should start with one of the following tags
> \[NEW\]… For new features
> \[IMPROVE\] For an improvement (performance or little improvements) in existing features
> \[FIX\] For bug fixes that affect the end-user
> \[BREAK\] For pull requests including breaking changes
> Chore: For small tasks
> Doc: For documentation
> \--\>
> 
> \<!-- Checklist!!! If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. 
> - I have read the Contributing Guide - https://github.com/RocketChat/Rocket.Chat/blob/develop/.github/CONTRIBUTING.md#contributing-to-rocketchat doc
> - I have signed the CLA - https://cla-assistant.io/RocketChat/Rocket.Chat
> - Lint and unit tests pass locally with my changes
> - I have added tests that prove my fix is effective or that my feature works (if applicable)
> - I have added necessary documentation (if applicable)
> - Any dependent changes have been merged and published in downstream modules
> \--\>
> 
> \## Proposed changes (including videos or screenshots)
> 
> Was
> !\[forGH\](https://user-images.githubusercontent.com/118266546/204087809-fca6152b-63db-4873-88b8-d86aeb324531.png)
> 
> Now
> !\[forGH2\](https://user-images.githubusercontent.com/118266546/204087822-e3273127-a4f0-4a45-a73e-910eb48c9b6f.png)
> 
> 
> \<!--
> Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
> If it fixes a bug or resolves a feature request, be sure to link to that issue below.
> This description will appear in the release notes if we accept the contribution.
> \--\>
> 
> 
> 
> \## Issue(s)
> 
> closes https://github.com/RocketChat/Rocket.Chat/issues/27298
> \## Steps to test or reproduce
> 
> 
> 1.) Turn off legacy message template (if on). \`Account -\> Preferences -\> global -\> Use legacy message template\`
> 2.) Turn on filtering of bad words \`Administration -\> settings -\> message -\> Allow Message bad words filtering\`
> 3.) Add bad words to the bad words list (comma separated) \`Administration -\> settings -\> message -\> Add Bad Words to the Blacklist\`
> 4.) Write a message with bad words. They should be censored.
> 
> \## Further comments
> 
> The bug happened because of precedence of message markdown parsing was higher than message censoring.

The fix will come in the 5.4.0 version!

Thanks!
