note 78172 deleted from function.html-entity-decode by danbrown
| From: | danbrown@php.net | Date: | Tue, 10 Jan 2012 20:12:19 +0000 |
| Subject: | note 78172 deleted from function.html-entity-decode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-185531@lists.php.net to get a copy of this message | ||
Note Submitter: Hayley Watson
----
To go further with Fabian's comment:
The XML specification (production 66) says that (decimal) numeric character references start with
'&#', followed by one or more digits [0-9], and end with a ';' - just as the
documented regular expression states. Hex references start with "&#x" and the allowed
digits are [0-9a-fA-F].
And indeed, ' is a legitimate reference for an apostrophe (but don't
tell Internet Explorer).
So Fabien's alteration to the expression is necessary. It's still insufficient, however,
as chr() does not handle multibyte characters such as "€".