note 29115 added to function.strip-tags

From: Date: Mon, 03 Feb 2003 09:52:53 +0000
Subject: note 29115 added to function.strip-tags
Groups: php.notes 
Request: Send a blank email to php-notes+get-43319@lists.php.net to get a copy of this message
To the person above who commented with the str_replace to change < and > into &lt; and &gt; your code is wrong. Your replacing it with %lt; and %gt; and even then you have them backwards. The correct code to replace < and > with HTML symbols: $message = str_replace("<", "&lt;", $message); $message = str_replace(">", "&gt;", $message); -- http://www.php.net/manual/en/function.strip-tags.php http://master.php.net/manage/user-notes.php?action=edit+29115 http://master.php.net/manage/user-notes.php?action=delete+29115 http://master.php.net/manage/user-notes.php?action=reject+29115

« previous php.notes (#43319) next »