Best approach to censor bad words in form input

Take a look at this thread here. It worked for me.