Let’s say “rude” was a profanity. If I type “r u d e”, it gets through your filter. (Students may enjoy exploiting this if they realise.)
Suggestion: update the algorithm to re-scan whatever the user has entered, but without spaces, and see if that matches a profanity, before allowing it through.