I tried AntiSamy hook. but i think it is only meant to remove malicious code from the content and not for removing bad words.
If a custom sanitizer is to be implemented, i will have to refer to some repository of bad words. It also needs to be able to filter the content based on the context in which the word is used.
Something similar is required to filter out offensive images to be uploaded.
Please sign in to flag this as inappropriate.