I'd keep my children away from these sort of people too.
I tell my children that this sort of people, ones who others stay away from because of their hurtful words are the kind of people we do not wish to become.
It's life you will come across people who are less than nice, you need to teach your child to take the good and learn from the bad, that we do not want to make people feel the way this sort of people make us feel.
I also tell my children its a test from Allah to see how we answer other peoples behaviour, we must always be kind even if the person in front of us is being mean, because we ultimately seek Allahs pleasure and forgiveness.
If they become very nasty, I would calmly pull the person up in a icily polite manner, ie did you mean to be so nasty to my 5/6/7 year old child because it certainly came across as a very nasty thing to say. When they get defensive you say please do not speak to my child like that it causes him a great deal of pain and he/she has been thro enough don't you think.
And make duas that Allah protect you from people like this.