@vascowhite well, i don't know if its more secure but if i use htmlspecialchars then i eliminate all the tags so no formatting, but if its like i can map the defined tags into an array which will have a set of allowable html tags and exculde others.
like [html]=><html> [br]=><br> or by xml