I'm making a form (html & php) which is part of an admin section used to edit content for a website. I want to allow users to include some basic html. This works fine. I want to retain line breaks. This also works. My problem is that when someone writes something like this:
<ul>
<li>item one</li>
<li>item two</li>
</ul>
the line breaks between the lines of code are retained and turned into BRs when written out. This means that there's double spacing between each LI element. Now this can be fixed by writing the whole list section on one line but a) that makes it confusing to read and b) it's hard enough teaching people to use the codes let alone explaining extraineous line breaks.
What I want is some way to strip all /n out but ONLY between UL and /UL tags.