ID:               35670
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mglind at utah dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Unknown/Other Function
 Operating System: FreeBSD 4.9
 PHP Version:      4.4.1
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2005-12-14 20:28:56] mglind at utah dot com

Description:
------------
In previous versions I was able to decode the double encoded string by
calling the html_entity_decode() just once. Now I have to call it twice
to get the same functionality.

Reproduce code:
---------------
<?
$encodedString = '&amp;lt;b&amp;gt;This is bold
text.&amp;lt;/b&amp;gt;';
echo $encodedString . '<br /><br />';
echo html_entity_decode($encodedString) . '<br /><br />';
?>

// Got expected result by calling decode funtion twice, which wasn't
needed in previous versions of PHP or at least 4.3.2
<?
$encodedString = '&amp;lt;b&amp;gt;This is bold
text.&amp;lt;/b&amp;gt;';
echo $encodedString . '<br /><br />';
echo html_entity_decode($encodedString) . '<br /><br />';
echo html_entity_decode(html_entity_decode($encodedString));
?>


Expected result:
----------------
This is bold text.

Above text displayed in bold.

Actual result:
--------------
<b>This is bold text.</b>

Displaying as html code rather than bold text.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35670&edit=1

Reply via email to