This is a reference guide for describing how the Watched Words page functions and the different types of action types you can use to block specific words on a Discourse site.
Required user level: Administrator
Understanding Watched Words
You can setup Watched Words to take actions based on words found in a topic or post (located at .../admin/customize/watched_words
).
There’s a max of 2000 words per type of action.
On all actions, *
can be used as a wildcard, and there’s an option to select if the watched words are case-sensitive.
By default, the watched words are hidden. Checking the “show words” checkbox will display them and allow you to delete them. Using the search field will also reveal any matching words.
Lists of Watched Words can be uploaded in bulk using the “Add from File” button, and a list of Watched Words for any action type can be downloaded from Discourse with the “Download” button. CSV is the required file format for uploading watched words in bulk.
All actions also have a “Test” button that can be used to test if a specific word or phrase contains any watched words.
Example of a matched watched word phrase
Example of a phrase with no matches
Action Types
The Watched Words page allows you to take the following types of actions on matched words:
A Watched Word can only exist in one action type list. If a duplicate word is added to a second list it will be removed from the previous list.
Block
Prevents topics or posts containing these words from being posted at the time they are submitted by blocking the entire topic / post. The user will see an error message when they try to submit their post.
Censor
Allows posts containing these words, but replace the words with characters that hide the censored words. Censored words will be replaced with blocks. (Ex: ■■■■■■■■)
Require Approval
Posts containing these words will require approval by staff before they can be seen. Upon submitting a post with a word with this action type, the post will be hidden until staff reviews it.
Admin posts will not be scanned for require approval words.
Flag
Allows posts containing these words, but flags them so moderators can review them. A post with a flagged word will appear normally but be submitted for review. The reviewer will have various options:
If they hide the post, it will still be viewable but will look something like this:
Clicking on the ‘View ignored content’ link will show the full contents, but still in the ‘post-hidden’ state.
If they choose ‘Keep Post,’ or choose ‘Disagree’ from the options, the post will look like this:
Admin posts will not be scanned for flagged words.
Link
Replaces words in posts with links. More commonly used to replace common words with links to specific topics or external URLs instead of censoring words.
If no Link URL is selected when adding a word to this type of action, the homepage of the Discourse site will automatically be used as the link to replace the word.
Replace
Replaces words in posts with other words.
If no Replacement word is selected when adding a word to this action, the word will be removed from the post, but no word replacement will take it’s place - the word will disappear from the post, and the post will be allowed to be submitted (Not Recommended).
The replace action type also has an Outputs HTML in the replacement
checkbox option.
This feature allows admins to use HTML formatting when setting replacement text, which can be especially useful for creating links and adding styling emphasis to automatically substituted text.
Remapping links through the use of watched words is not recommended, and can cause more trouble than intended. Therefore, the ability to remap links using Watched Words → Replace setting is intentionally disabled, and links will not be remapped in topics or posts regardless of watched word settings.
Tag
Automatically tags topics with these words based on first post in the topic. One or more tags can be added for each word included in this action.
A tag must be included when submitting a word with this type of action, otherwise you will receive an error.
Also note that when tagging topics with a watched word, the word must be included in the topic at the time the topic is posted in order for the topic to be correctly tagged. Editing a topic after it has been created with a watched word for a tag will not add the tag to the topic.
Silence
First posts of users containing these words will require approval by staff before they can be seen and the user will be automatically silenced. A user who uses a “silence” word on their first post will be silenced and the post be will sent to the moderation queue
Regex Expressions
For information about using Regex Expressions with Watched Words see:
Using Regex with Watched Words
Last edited by @SaraDev 2024-11-19T21:58:08Z
Check document
Perform check on document: