I use nl2br
when displaying some information that is saved somewhere, but when HTML tags are used I want not to add <br>
tags for them.
For example if I use
<table>
<th></th>
</table>
it will be transformed to
<table><br />
<th></th><br />
</table><br />
and that makes a lot of spaces for this table.
Ho can break line tags be added only for other non-HTML content?
Thanks.
nl2br
on those strings that you don't want new<br />
s in? – Delapaz