ID:               50118
 Updated by:       scott...@php.net
 Reported By:      floder at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: all
 PHP Version:      5.3.1RC3
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of bug #50106


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

[2009-11-09 08:32:34] floder at gmail dot com

Description:
------------
Problem with htmlspecialchars PHP function.
In HTML5 are allowed only numeric entities. 
In XML parsing mode browser interrupts errors. 

Reproduce code:
---------------
<=htmlspecialchars('&')>

Expected result:
----------------
¡'&' (ampersand) becomes '&#38;' 
¡'"' (double quote) becomes '&#34;' 
¡''' (single quote) becomes '&#39;' 
¡'<' (less than) becomes '&#60;' 
¡'>' (greater than) becomes '&#62;' 

Actual result:
--------------
¡'&' (ampersand) becomes '&amp;' 
¡'"' (double quote) becomes '&quot;'
¡''' (single quote) becomes '&#039;'
¡'<' (less than) becomes '&lt;' 
¡'>' (greater than) becomes '&gt;' 


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


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

Reply via email to