Coprolalia
Coprolalia is involuntary swearing or the involuntary utterance of obscene words or socially inappropriate and derogatory remarks. Coprolalia comes from the Greek κόπρος (kopros) meaning "feces" and λαλιά (lalia) from lalein, "to talk". The term is often used as a clinomorphism, with 'compulsive profanity' inaccurately referred to as being Tourette syndrome.
Read more about Coprolalia.