note 56275 added to function.strip-tags
| From: | info at christopher-kunz dot de | Date: | Mon, 29 Aug 2005 13:34:43 +0000 |
| Subject: | note 56275 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94337@lists.php.net to get a copy of this message | ||
Please note that the function supplied by daneel at neezine dot net is not a good way of avoiding
XSS attacks. A string like
<font size=">>" <script>alert("foo")</script>
face="tahoma" color="#DD0000">salut</font>
will be sanitized to
<font>>" <script>alert("foo")</script> face="tahoma"
color="#DD0000">salut</font>
which is a pretty good XSS.
If you are in need of XSS cleaning, you might want to consider the Pixel-Apes XSS cleaner: http://pixel-apes.com/safehtml
----
Manual Page -- http://www.php.net/manual/en/function.strip-tags.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56275
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56275&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56275&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56275&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56275&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56275&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56275&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56275&report=yes
Search -- http://master.php.net/manage/user-notes.php