An example of a whitelist.

A whitelist is a list of words which dictate whether a word is allowed in a piece of text. They are often used in chatrooms to prevent undesired language from being posted.

Whitelists usually contain words used in everyday language and omit words that could be considered rude or offensive. They are usually used in chatroom projects to prevent undesired language from being posted. However, using a whitelist in a chatroom project is not allowed, since a whitelist can be bypassed to make inappropriate phrases with clever sentence construction.

Some whitelists are not used to censor or remove language, but instead to allow access to features only available to certain users. However, not only is gatekeeping a project to certain users not allowed,[citation needed] such restrictions can be easily be evaded by editing the project's code to remove the whitelist.


Note Warning: Cloud chat projects are not allowed on the website even if they whitelist specific words or phrases, or implement other safeguard features, as such restrictions can be easily evaded. Only projects which only allow for pre-made sentences to be sent are allowed.[1]

Example Implementation

A technique to implement a whitelist would be to split the sentence into words and then use this script:

set [i v] to (0)//i stands for iterator
repeat (length of [message v])//"message" should be split into words as stated above
    change [i v] by (1)
    if <not <[allowed words v] contains (item (i) of [message v])>> then
        replace item (i) of [message v] with (. . .:: grey) // set this to whatever you want to replace a disallowed word
    end
end

or:

set [i v] to (0) // i stands for iterator
repeat (length of [message v]) // "message" should be split into words as stated above
    change [i v] by (1)
    if <(translate (item (i) of [message v]) to (Russian v)) = []> then // the translate block is used, as it does not translate any words which it considers inappropriate
        replace item (i) of [message v] with (. . .:: grey)//set this to whatever you want to replace a disallowed word
    end
end

See Also

References

Cookies help us deliver our services. By using our services, you agree to our use of cookies.