Bug #12982 Updated: strip_tags() problem with title in <a>-tags
| From: | derick@php.net | Date: | Sun, 07 Jul 2002 17:08:39 +0000 |
| Subject: | Bug #12982 Updated: strip_tags() problem with title in <a>-tags | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13401@lists.php.net to get a copy of this message | ||
ID: 12982
Updated by: derick@php.net
Reported By: jesper_ronn@hotmail.com
-Status: Open
+Status: Verified
Bug Type: Strings related
Operating System: win 2000
-PHP Version: 4.0.6
+PHP Version: 4.2.1
Previous Comments:
------------------------------------------------------------------------
[2001-08-27 12:46:11] jesper_ronn@hotmail.com
<?php
$t = '<a title="Errors in string parsed from website!
String containing errors: \'<b>Warning</b>:\'
">i</a>';
echo '-->'.strip_tags($t).'<--'.strlen(strip_tags($t));
echo "\n<br> should be:\n<br>";
echo '-->i<--1';
echo "\n<br> i get:\n<br>";
echo "-->Warning:' \">i<--14 ";
?>
Can someone explain this error? I would be afraid that the function
gets confused by
* the extra line feeds
* the nested <b> tags in the title attribute
(which should definately not show up!)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=12982&edit=1