Close all open tags in HTML text

From: Date: Thu, 09 Dec 2004 03:33:19 +0000
Subject: Close all open tags in HTML text
Groups: php.general 
Request: Send a blank email to php-general+get-203785@lists.php.net to get a copy of this message
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? Thanks, Matt

« previous php.general (#203785) next »