Handling bad words
If a bad word is detected, the system performs one of the following actions:
- Remove - the bad word is removed from the entered text with no substitution.
- Replace - the bad word is removed and replaced with a predefined string.
- Report abuse - a report is created in the Abuse report application.
- Request moderation - the post is submitted for approval before being published. This happens even if the respective forum, message board or blog is not moderated by default.
- Deny - the system displays a warning message when the user tries to post the inadequate text, listing which words must be removed.
If there is more than one bad word detected in the input text and the words have different actions set, the actions are performed according to the following hierarchy: Remove, Replace and Report abuse actions are independent, i.e. the actions can be taken simultaneously. Request moderation is stronger than Report abuse and Deny is the strongest of all.
The following list shows which actions are performed in some specific cases:
- Remove and Replace - the first bad word is removed and the second one is replaced with the defined substitute.
- Remove, Replace and Report abuse - the first bad word is removed, the second one is replaced and an abuse report is logged.
- Remove, Replace and Request moderation - the first bad word is removed, the second one is replaced and the post has to be approved.
- Report abuse and Request moderation - the post has to be approved and no abuse report is logged.
- Deny and any other - the text is left as it is, but produces an error message.
Replace action in fields with limited length
If the Replace action is performed in a text entered into a field with limited length, it it possible that the text with replaced bad words exceeds the maximum length (when the replacement text is longer than the original bad word). In this case, the system replaces the bad word with as many asterisks as its length.
When there are multiple bad words in the text, replacement starts from the beginning of the string. If replacement of the first bad word doesn’t cause exceeding of the input field maximum length, the word is replaced with the replacement text. The same applies to the subsequent bad words and asterisks start to be used with the first bad word whose replacement would cause exceeding of the input field maximum length.