XML RPC > html in response > htmlspecialchars + javascript stripping |
[eluser]HdotNET[/eluser]
Hi there, Building an XMLRPC server application. The problem I am having is that I need to send html as a response, however the response is being recieved escaped using htmlspecialchars. ie, this: Code: <html> becomes this in the response: EDIT: Spaces put in artificially after ampersands to prevent the browser rendering them as entities. Code: <?xml version="1.0" encoding="UTF-8"?> and once the client outputs the result, the script tag has also been stripped: Code: & lt;html& gt;& lt;body& gt;This is some text. var thing="blah";& lt;/body& gt;& lt;/html& gt; My testing here is using the example lifted straight form the manual: http://ellislab.com/codeigniter/user-gui...mlrpc.html Except the server response is formulated as follows: Code: $string = '<html><body>This is some text. var thing="blah";</body></html>'; Looking through the XML-RPC code I can see that htmlspecialchars is used, while not ideal I suppose I can get round that with htmlspecialchars_decode. Or alternativley alter the library so as to allow it to send html using cdata I haven't yet found how the tags are being removed, which is somewhere in the client library. So my question is ... How the hell do I send html with javascript? Or shoudl I RTFM a bit more ;-)? http://www.xmlrpc.com/spec |
Welcome Guest, Not a member yet? Register Sign In |