in reply to Substituting Newline Characters

If you want to be xhtml-compliant use <br />. Remember to escape the slash in your regex if you use it.

Update: changed < br/> to <br />.
Thanks you for the advice, Happy-the-Monk.