Defining a bad word

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The Bad words module's user interface is located in Site Manager -> Administration -> Bad words. This is where all existing bad words are listed and where new bad words can be defined.

 

devguide_clip0098

 

The top part of the page is a filter. Using it, you can display only those bad words that match the specified criteria. You can filter by the Expression and by the Action that should be taken on its detection. After specifying the filtering criteria and clicking the Show button, only those items that match the specified criteria will be displayed in the list.

 

Adding a new bad word

 

1. To add a new bad word, click the New bad word (NewBadWord) link at the top of the page. You will be redirected to the New bad word dialog. The following details can be entered:

 

Bad word - the string that should not appear in input text
Bad word is a regular expression - if checked, the string entered into the previous field will searched as a regular expression
Action - action that will be taken in case that the bad word is detected; see the Possible actions topic for more details

Use default settings - if enabled, global value will be used as set in Site Manager -> Settings -> Bad words -> Bad word action

Replace with - in case the Replace action is selected, the substitute for the bad word is defined here

Use default settings - if enabled, global value will be used as set in Site Manager -> Settings -> Bad words ->  Bad word replacement

 

Fill in the required details and click OK.

 

devguide_clip0099

 

2. Let's try the functionality now. Go to the live Corporate Site, enter the Blog section and open some of the blog posts. Enter a comment as in the following screenshot and click Add.

 

devguide_clip0403

 

3. As you can see, the last word has been replaced with its polite substitute that has been defined earlier.

 

devguide_clip0404

 

4. You can also check the Event log in Site Manager -> Administration. An event is always logged automatically when user input containing a bad word is detected. The Event code is BADWORD in such case.

 

devguide_clip0405

 

Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?defining_a_bad_word.htm