note 21249 added to function.strip-tags
| From: | bec at quietly dot zzn dot com | Date: | Sun, 05 May 2002 01:05:07 +0000 |
| Subject: | note 21249 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-30201@lists.php.net to get a copy of this message | ||
strip_tags() doesn't remove lone opening comment tags (like so: <!-- )
if you are getting user input (via a form, or what), someone can put in a "<!--"
(without the closing tag) and the rest of the html on that page will not show. to catch these:
$stuff = strip_tags($stuff);
$stuff = str_replace('<!--', '', $stuff);
--
http://www.php.net/manual/en/function.strip-tags.php
http://master.php.net/manage/user-notes.php?action=edit+21249
http://master.php.net/manage/user-notes.php?action=delete+21249
http://master.php.net/manage/user-notes.php?action=reject+21249