Bug #12982: strip_tags() problem with title in <a>-tags

From: Date: Mon, 27 Aug 2001 16:46:11 +0000
Subject: Bug #12982: strip_tags() problem with title in <a>-tags
Groups: php.dev 
Request: Send a blank email to php-dev+get-64422@lists.php.net to get a copy of this message
From: jesper_ronn@hotmail.com Operating system: win 2000 PHP version: 4.0.6 PHP Bug Type: Strings related Bug description: strip_tags() problem with title in <a>-tags <?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 bug report at: http://bugs.php.net/?id=12982&edit=1

« previous php.dev (#64422) next »