Matt Palermo wrote:

I am allowing users to imput HTML code into a textarea. After they input this, I wany to output their HTML to the browser. In order for the document to be safe, I need to close all open HTML tags that have been left open by the user, along with any open comments. Is there a way to take an HTML string and add closing tags and comments to it if needed?

Certainly not impossible but by no means an easy task. You would be doing the job of an html validator and it's probably better for you to use a third party library for that than to code it yourself.



Raditha Dissanayake.
------------------------------------------------------------------ | Card Designer Applet | Drag and Drop Upload

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to