svn: /web/php-bugs/trunk/include/ functions.php
| From: | Adam Harvey | Date: | Wed, 10 Nov 2010 09:46:15 +0000 |
| Subject: | svn: /web/php-bugs/trunk/include/ functions.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-9394@lists.php.net to get a copy of this message | ||
aharvey Wed, 10 Nov 2010 09:46:15 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305240
Log:
Fix bug #52779 (Bug tracker's RSS/RDF feeds are malformed (unescaped XML
invalid chars)).
Bug: http://bugs.php.net/52779 (Open) Bug tracker's
RSS/RDF feeds are malformed (unescaped XML invalid chars)
Changed paths:
U web/php-bugs/trunk/include/functions.php
Modified: web/php-bugs/trunk/include/functions.php
===================================================================
--- web/php-bugs/trunk/include/functions.php 2010-11-10 07:21:12 UTC (rev 305239)
+++ web/php-bugs/trunk/include/functions.php 2010-11-10 09:46:15 UTC (rev 305240)
@@ -317,7 +317,36 @@
*/
function clean($in)
{
- return htmlspecialchars($in, ENT_QUOTES, 'UTF-8', false);
+ return mb_encode_numericentity($in,
+ array(
+ 0x0, 0x8, 0, 0xffffff,
+ 0xb, 0xc, 0, 0xffffff,
+ 0xe, 0x1f, 0, 0xffffff,
+ 0x22, 0x22, 0, 0xffffff,
+ 0x26, 0x27, 0, 0xffffff,
+ 0x3c, 0x3c, 0, 0xffffff,
+ 0x3e, 0x3e, 0, 0xffffff,
+ 0x7f, 0x84, 0, 0xffffff,
+ 0x86, 0x9f, 0, 0xffffff,
+ 0xfdd0, 0xfdef, 0, 0xffffff,
+ 0x1fffe, 0x1ffff, 0, 0xffffff,
+ 0x2fffe, 0x2ffff, 0, 0xffffff,
+ 0x3fffe, 0x3ffff, 0, 0xffffff,
+ 0x4fffe, 0x4ffff, 0, 0xffffff,
+ 0x5fffe, 0x5ffff, 0, 0xffffff,
+ 0x6fffe, 0x6ffff, 0, 0xffffff,
+ 0x7fffe, 0x7ffff, 0, 0xffffff,
+ 0x8fffe, 0x8ffff, 0, 0xffffff,
+ 0x9fffe, 0x9ffff, 0, 0xffffff,
+ 0xafffe, 0xaffff, 0, 0xffffff,
+ 0xbfffe, 0xbffff, 0, 0xffffff,
+ 0xcfffe, 0xcffff, 0, 0xffffff,
+ 0xdfffe, 0xdffff, 0, 0xffffff,
+ 0xefffe, 0xeffff, 0, 0xffffff,
+ 0xffffe, 0xfffff, 0, 0xffffff,
+ 0x10fffe, 0x10ffff, 0, 0xffffff,
+ ),
+ 'UTF-8');
}
/**