#28597 [Opn]: Wrong numeric entities convertion in xmlrpc_encode_request
| From: | fernando dot nemec at folha dot com dot br | Date: | Tue, 01 Jun 2004 00:04:58 +0000 |
| Subject: | #28597 [Opn]: Wrong numeric entities convertion in xmlrpc_encode_request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60226@lists.php.net to get a copy of this message | ||
ID: 28597
User updated by: fernando dot nemec at folha dot com dot br
Reported By: fernando dot nemec at folha dot com dot br
Status: Open
Bug Type: XMLRPC-EPI related
Operating System: Linux 2.4
PHP Version: 4.3.6
New Comment:
Actually, I have made a patch for this issue, but Im not sure for who I
must send it.
So, the URL with a udiff is:
http://ls.homelinux.net/~fnemec/xml_element.c.diff
Thanks,
Nemec
Previous Comments:
------------------------------------------------------------------------
[2004-06-01 01:55:27] fernando dot nemec at folha dot com dot br
Description:
------------
In special circunstances, the funcion xmlrpc_encode_request may do
wrong numeric entities convertions.
This occur when the escaping is set to "non-ascii" (this is on by
default) and when the xml data has any caracter which ascii code % 10 <
10 (ex: 202,203,204, so on).
Reproduce code:
---------------
$request_xml = xmlrpc_encode_request( "method" , Array( "Ñemec" ) ,
Array( "version" => "xmlrpc" ) ) ;
print( $request_xml ) ;
Expected result:
----------------
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>teste</methodName>
<params>
<param>
<value>
<string>Ñemec</string>
</value>
</param>
</params>
</methodCall>
Actual result:
--------------
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>teste</methodName>
<params>
<param>
<value>
<string>emec</string>
</value>
</param>
</params>
</methodCall>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28597&edit=1