htmlspecialchars() or htmlentities without destroying tags?

From: Date: Wed, 08 Jan 2003 03:07:27 +0000
Subject: htmlspecialchars() or htmlentities without destroying tags?
Groups: php.general 
Request: Send a blank email to php-general+get-130685@lists.php.net to get a copy of this message
Hi all, Has anyone got a function or regexp floating around that will convert behave like htmlspecialchars() or htmlentities() (eg converting & to &amp;, " to &quote;, etc etc) BUT NOT DESTROY HTML TAGS? Eg: "hello" said <a href="fred.php">Fred</a> & Judy should become: &quot;hello&quot; said <a href="fred.php">Fred &amp; Judy NOT: &quot;hello&quot; said &lt;a href=&quot;fred.php&quot;&gt;Fred &amp; Judy ???? I guess it's stripped down or limited version of htmlspecialchars() or htmlentities(). Justin

« previous php.general (#130685) next »