[PEPr] Comment on HTML::HTML_Entities
| From: | Michael Gauthier | Date: | Wed, 02 Apr 2008 02:57:26 +0000 |
| Subject: | [PEPr] Comment on HTML::HTML_Entities | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49601@lists.php.net to get a copy of this message | ||
Michael Gauthier (http://pear.php.net/user/gauthierm) has commented on the proposal for
HTML::HTML_Entities.
Comment:
Regarding PHP5 compatibility, your code will raise E_STRICT errors for
calling non-static methods statically.
I'd make the preg_replace_callback() callback functions private static
methods rather than using create_function().
Also, you may want to optionally validate the UTF-8 parsed from numeric
character references. Certain code points such as #xFFFF, #128 and #12 are
not allowed in XML though they may be allowed in other SGML dialects.
Your code could use more inline comments for the UTF-8 conversion blocks
to make future maintenance in PEAR easier.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=546
--
Sent by PEPr, the automatic proposal system at http://pear.php.net