note 34596 rejected from function.strip-tags by didou
| From: | didou@php.net | Date: | Thu, 31 Jul 2003 20:58:20 +0000 |
| Subject: | note 34596 rejected from function.strip-tags by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53107@lists.php.net to get a copy of this message | ||
Note Submitter: dmarsh.NOSPAM@spscc.ctc.edu
----
This function only works with standard tags...
inline comments or DOCTYPE (or similar) tags that follow a convention of more than just the less
than (<) character to begin a tag will have a somewhat different result. You should search and
replace "<!--" and "<!" with "<" so that ALL tags are
removed.
This is "sort of" a bug as this area of tag (tags beginning with <!-- or <!)
manipulation was probably not conceived when initially developing this function.
In fact:
echo strip_tags('<!DOCTYPE HTML PUBLIC "-//IETF//DTD
HTML//EN"><BODY><HTML><P>Hello
World</P></HTML></BODY>');
returns nothing (using PHP v.4.3.0) as it gets buggered on the DOCTYPE tag.
--Doug