#40637 [Asn->Csd]: strip_tags does not handle single quotes correctly (regression)
| From: | iliaa@php.net | Date: | Tue, 27 Feb 2007 00:15:27 +0000 |
| Subject: | #40637 [Asn->Csd]: strip_tags does not handle single quotes correctly (regression) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109621@lists.php.net to get a copy of this message | ||
ID: 40637
Updated by: iliaa@php.net
Reported By: email at steffenweber dot net
-Status: Assigned
+Status: Closed
Bug Type: Strings related
Operating System: Linux
PHP Version: 5.2.1
Assigned To: iliaa
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-02-26 09:51:22] email at steffenweber dot net
Description:
------------
The fix for bug #40432 (http://bugs.php.net/bug.php?id=40432) seems to
have broken the strip_tags function.
I'm using PHP 5.2.1 and have additionally applied this patch:
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.39&r2=1.445.2.14.2.40&view=patch
Reproduce code:
---------------
<?php
$html = '<span title="Bug \' Trigger">Text</span>';
var_dump(strip_tags($html));
?>
Expected result:
----------------
Prints "Text".
Actual result:
--------------
Prints the empty string.
Notice that the following slightly modified code correctly prints
"Text":
<?php
$html = '<span title="Foo">Text</span>';
var_dump(strip_tags($html));
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40637&edit=1