There is such a multitude of rude people and I feel there are not enough mods to help pinpoint them and take care of the situation. However, ignoring does work fine but as many have said I don't tend to ignore people.
Then there is the issue of buttswinging in their faces which as it was said IS harassment and against the rules. Simply smiling at them, or ignoring them will make them just as angry anyway and will be safer for you. I have attempted to ask people to politely stop their offensiveness and there is a small margin where it actually does work at times but in the long run don't let it bother you if your effort is ignored. Take screenshots, report and go back about your business. If your chatting with someone, then openly ignoring them works wonders. They want you to respond to them and the more often you do so the longer they stick around to harass you.
However, chatting among your friends and allowing them to see your not in the least bit bothered by their banter works most of the time.