Welcome Guest, Not a member yet? Register   Sign In
XML_RPC Library escaping values?
#1

[eluser]louis w[/eluser]
Is there a way to prevent the xml-rpc library from escaping values without turning it off site side?

I am using log_message to output the contents of a variable in my response before i send and when I receive and getting strange escapes on the client.

Code:
SERVER SENDS:
<data page_id="511" path="/home" template_file_name="home">
    &lt;title&gt;&lt;![CDATA[Home]]>&lt;/title&gt;
    <content_xml><data><test>&lt;![CDATA[Hello]]></test></data></content_xml>
    <parent_path>&lt;![CDATA[/]]></parent_path>
</data>

CLIENT RECEIVES:
<data page_id="511" path="/home" template_file_name="home">
    & lt;title& gt;& lt;![CDATA[Home]]>& lt;/title& gt;
    <content_xml><data><test>& lt;![CDATA[Hello]]></test></data></content_xml>
    <parent_path>& lt;![CDATA[/]]></parent_path>
</data>
(I had to place a space between the & and gt; to make the board display it as an escaped value)


I do have $config['global_xss_filtering'] = FALSE; in my config.
#2

[eluser]Nick Husher[/eluser]
Flipping through the xmlrpc and xmlrpcs code indicates that strings are run through PHP's htmlspecialchars function. I'm not sure there's an easy way around that except to modify the xmlrpc.php file in your libraries directory.




Theme © iAndrew 2016 - Forum software by © MyBB