I'm attempting to write a chat server and I've come across the issue that if someone puts markup in their messages e.g.
<strong>blah</strong>
You need to filter your input to take out unwanted tags. There really isn"t much else to it.