[PHP-DOC] #21013 [NEW]: strip_tags doesn't work with regular HTML-Expression <br> From: digex <email protected>
Date: 12/14/02

From: digex <email protected>
Operating system: Windows XP, FreeBSD
PHP version: 4.3.0RC3
PHP Bug Type: Documentation problem
Bug description: strip_tags doesn't work with regular HTML-Expression <br>

strip_tags doesn't work as expected.
When trying so trip <br>-tags, strip_tags doesn't strip anything. It maybe
strips somewhere else, but not on my screen. :-)

Take this example code:
<?
$fin ="blabla<br>blabla";
$res =strip_tags($fin, "<br>");
echo $res;
?>

echo outputs blabla<br>blabla in the HTML-Source.

The solution is leaving the angle-brackets away like:
<?
$fin ="blabla<br>blabla";
$res =strip_tags($fin, "br");
echo $res;
?>

But this doesn't correspond with the Documentation at
http://www.php.net/manual/en/function.strip-tags.php
Escaping with $res =strip_tags($fin, "\<br\>"); does it, but why?

-- 
Edit bug report at http://bugs.php.net/?id=21013&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21013&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21013&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21013&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21013&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21013&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21013&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21013&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21013&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21013&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21013&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21013&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21013&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21013&r=isapi

-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php