note 11938 added to function.strip-tags.php
| From: | david at surffactory dot se | Date: | Wed, 14 Mar 2001 13:23:15 +0000 |
| Subject: | note 11938 added to function.strip-tags.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-12390@lists.php.net to get a copy of this message | ||
It's a good idea to write a function of your own if you're planning to allow some
html-tags. It seems like strip_tags() doesn't care about arguments in the tags. Ex. if you want
to allow <b> and you use:
strip_tags($str, "<b>");
Someone can write something like this:
<b onmouseover="for(i=0;i<50;i++)window.open('www.porn.com');">Long
message...</b>
http://www.php.net/manual/en/function.strip-tags.php