note 29115 added to function.strip-tags
| From: | shadow at rack1 dot php dot net | 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 < and
> 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("<", "<", $message);
$message = str_replace(">", ">", $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