note 16446 deleted from function.htmlspecialchars by jimw

From: Date: Wed, 31 Oct 2001 02:45:56 +0000
Subject: note 16446 deleted from function.htmlspecialchars by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19687@lists.php.net to get a copy of this message
If you store html processed through htmlspecialchar() in your database, you may need to convert it back to real html, but only for the <a href=""></a> tags, to prevent users from posting garbage on your site. Here the command: preg_replace("/\&lt;(a href=)\&quot;(.*?)\&quot;\&gt;(.*?)\&lt;(\/a)\&gt;/i","<\\1\"\\2\">\\3<\\4>",$string); Regexps rule !

« previous php.notes (#19687) next »