|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-11-09 15:19 UTC] scottmac@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 23 10:00:01 2025 UTC |
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 '&' ??'"' (double quote) becomes '"' ??''' (single quote) becomes ''' ??'<' (less than) becomes '<' ??'>' (greater than) becomes '>' Actual result: -------------- ??'&' (ampersand) becomes '&' ??'"' (double quote) becomes '"' ??''' (single quote) becomes ''' ??'<' (less than) becomes '<' ??'>' (greater than) becomes '>'