#45485 [Opn->Asn]: strip_tags and <?XML tag
| From: | felipe@php.net | Date: | Fri, 11 Jul 2008 11:59:29 +0000 |
| Subject: | #45485 [Opn->Asn]: strip_tags and <?XML tag | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-126468@lists.php.net to get a copy of this message | ||
ID: 45485
Updated by: felipe@php.net
Reported By: jlim at natsoft dot com
-Status: Open
+Status: Assigned
Bug Type: Strings related
Operating System: Windows
PHP Version: 5.2.6
-Assigned To:
+Assigned To: felipe
Previous Comments:
------------------------------------------------------------------------
[2008-07-11 11:12:30] jlim at natsoft dot com
Description:
------------
This is related to bug #12860. The HTML tags are not stripped properly
because of <?XML.
Bugfix #12860 fixes the problem of strip_tags parsing <?xml but not
<?XML
I don't have control over the HTML I am stripping because it is from
MS-Outlook generated HTML (ugh).
Regards, John Lim
Reproduce code:
---------------
<?php
# DOES NOT WORK
$s =<<< EOD
This text is shown <?XML:NAMESPACE PREFIX = ST1 /><b>This Text
disappears</b>
EOD;
$s = strip_tags($s);
echo htmlspecialchars($s),"<hr>";
# WORKS
$s =<<< EOD
This text is shown <?xml:NAMESPACE PREFIX = ST1 /><b>This Text
disappears</b>
EOD;
$s = strip_tags($s);
echo htmlspecialchars($s),"<br>";
?>
Expected result:
----------------
This text is shown This Text disappears
------
This text is shown This Text disappears
Actual result:
--------------
This text is shown
------
This text is shown This Text disappears
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45485&edit=1