PHP 4.0 Bug #5666 Updated: htmlentities & htmlspecialchars don't work
| From: | Bug Database | Date: | Wed, 19 Jul 2000 07:06:10 +0000 |
| Subject: | PHP 4.0 Bug #5666 Updated: htmlentities & htmlspecialchars don't work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-25035@lists.php.net to get a copy of this message | ||
ID: 5666
User Update by: enrico@efc.it
Status: Feedback
Bug Type: Misbehaving function
Description: htmlentities & htmlspecialchars don't work
<?
$a = get_html_translation_table( HTML_SPECIAL_CHARS );
while( $val=each($a) )
echo $val[0]." -> ".$val[1]."<br>";
?>
Give as result:
& -> &
" -> "
< -> <
> -> >
and the same occurs using HTML_ENTITIES.
As conseguence, when I use htmlentities() or htmlspecialchars() no translation occurs.
For example:
echo htmlspecialchars( "1 < 2" );
returns
"1 < 2"
Full Bug description available at: http://bugs.php.net/?id=5666