[wp-hackers] Posting HTML formatted content with XML-RPC

Owen Winkler ringmaster at midnightcircus.com
Wed Jan 11 19:23:46 GMT 2006

Chris Lott wrote:
> I tried #wordpress and the forums with no luck so far, so I will ask here:
> How can I post an HTML formatted post via the XML-RPC interface? If I
> post the HTML code it gets converted to entities. If I preconvert
> content to entities, it doesn't get converted back (obviously) :) 
> I've made this work with a couple of direct db inserts, but XML-RPC
> would be much cleaner and not subject to as many changes I would have
> to keep up with...
> Plain text posts work fine using this code, formatted posts from other
> XML-RPC clients work fine.
> I am using PHP with the xml-rpc library. Example Code:

I think the library you're using might be part of the problem:


Try using the IXR Client and see if that works ok for you.

Still...  Having looked through the IXR library, can anyone confirm that 
encoded entities passed in XMLRPC values are properly decoded?  The 
XML-RPC spec seems to imply that entities in XML should be decoded by 
the RPC server, which kind of makes sense.  If it's not doing that, it 

And what about UTF-8 support?  The XML parser isn't created with UTF-8 
turned on, so I wonder if it's doing the right thing.


More information about the wp-hackers mailing list