Remove characters that do not appear in the whitelist.
The characters are used in a RegExp and so you will need to escape some chars, e.g. whitelist(input, '\\[\\]').
RegExp
whitelist(input, '\\[\\]')
Generated using TypeDoc
Remove characters that do not appear in the whitelist.