#45599 [Opn->Ver]: strip_tags() truncates rest of string with invalid attribute
| From: | jani@php.net | Date: | Tue, 22 Jul 2008 23:59:35 +0000 |
| Subject: | #45599 [Opn->Ver]: strip_tags() truncates rest of string with invalid attribute | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127162@lists.php.net to get a copy of this message | ||
ID: 45599
Updated by: jani@php.net
Reported By: david at grudl dot com
-Status: Open
+Status: Verified
Bug Type: Strings related
Operating System: *
PHP Version: 5.2CVS, 5.3CVS, 6CVS (2008-07-22)
Previous Comments:
------------------------------------------------------------------------
[2008-07-22 23:37:57] david at grudl dot com
Description:
------------
Problematic backslash in HTML attribute (bug exists since PHP 5.2.2)
Reproduce code:
---------------
1)
echo strip_tags('Hello <a href="any\\"> World');
2) this case is not HTML valid, but who cares...
echo strip_tags('Hello <a href=\"any"> World');
Expected result:
----------------
Hello World
(in both cases)
Actual result:
--------------
Hello
(in both cases)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45599&edit=1