#45865 [Opn->Bgs]: incorrect values returned by htmlspecialchars_decode

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               45865
 Updated by:       [email protected]
 Reported By:      firealwaysworks at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: Linux
 PHP Version:      5.2.6
 New Comment:

There is no some bug in this behavior.
Read: http://docs.php.net/htmlspecialchars_decode

Thanks.


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

[2008-08-19 23:46:47] firealwaysworks at gmail dot com

Description:
------------
As I understand it htmlspecialchars_decode is the inverse of
htmlspecialchars.  The bug is that not all characters are inverted
properly.

Thanks,
Michael 

Reproduce code:
---------------
<?php
echo "\n".htmlspecialchars_decode(htmlspecialchars("'",ENT_QUOTES));
echo "\n".htmlspecialchars_decode(htmlspecialchars('"',ENT_QUOTES));
?>

Expected result:
----------------
'
"

Actual result:
--------------
&#039;
"


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


-- 
Edit this bug report at http://bugs.php.net/?id=45865&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.