note 32667 deleted from function.strip-tags by vrana
| From: | vrana@php.net | Date: | Mon, 22 Dec 2003 16:29:37 +0000 |
| Subject: | note 32667 deleted from function.strip-tags by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62339@lists.php.net to get a copy of this message | ||
Note Submitter: matt at endless vertigo dot something
----
ryland at ryland dot net
had a nice simple function to remove all tags except the basics and strip any attributes besides
href from inside an <a> tag.
problem with his version is that it can be easily fooled by case
<A href="http://somesite.com"
onClick="alert("alert");">click me</a>
would not be modified because ereg_replace is case sensitive.
also,
<a hRef=....
would have the same effect.
use eregi_replace instead and it seems to work fine.
matt