Date: 12/14/02
- Next message: digex <email protected>: "[PHP-DOC] #21013 [Com]: strip_tags doesn't work with regular HTML-Expression <br>"
- Previous message: digex <email protected>: "[PHP-DOC] #21013 [NEW]: strip_tags doesn't work with regular HTML-Expression <br>"
- In reply to: digex <email protected>: "[PHP-DOC] #21013 [NEW]: strip_tags doesn't work with regular HTML-Expression <br>"
- Next in thread: digex <email protected>: "[PHP-DOC] #21013 [Com]: strip_tags doesn't work with regular HTML-Expression <br>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 21013
Updated by: philip <email protected>
Reported By: digex <email protected>
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Windows XP, FreeBSD
PHP Version: 4.3.0RC3
New Comment:
>From the docs:
"You can use the optional second parameter to specify tags which should
not be stripped."
So, that parameter is named allowable_tags, not tags_to_remove
Previous Comments:
------------------------------------------------------------------------
[2002-12-14 11:42:39] digex <email protected>
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 this bug report at http://bugs.php.net/?id=21013&edit=1-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: digex <email protected>: "[PHP-DOC] #21013 [Com]: strip_tags doesn't work with regular HTML-Expression <br>"
- Previous message: digex <email protected>: "[PHP-DOC] #21013 [NEW]: strip_tags doesn't work with regular HTML-Expression <br>"
- In reply to: digex <email protected>: "[PHP-DOC] #21013 [NEW]: strip_tags doesn't work with regular HTML-Expression <br>"
- Next in thread: digex <email protected>: "[PHP-DOC] #21013 [Com]: strip_tags doesn't work with regular HTML-Expression <br>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

