note 34596 added to function.strip-tags
| From: | dmarsh dot NOSPAM at spscc dot ctc dot edu | Date: | Thu, 31 Jul 2003 18:30:22 +0000 |
| Subject: | note 34596 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-53100@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/function.strip-tags.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34596
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34596&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34596&report=yes