I am using python-wordpress-xmlrpc to edit a page to wordpress, I generate some HTML and I am sending it to wordpress. The content is a piece of valid html code, it consists of regular html tags and some text. However when I browse to the page in Wordpress dashboard, the page content looks like:

h2My Product C++/h2

div style=”border: 2px solid #ECECEC;-webkit-box-shadow: 1px 2px 5px #888;”
p align=”justify”bFDM/b (bx) is something nice

As you see <h2> becomes h2>, <div> has become div>.

The HTML on the Python side looks OK, so I am guessing that I am not using the XML RPC correctly. Any ideas where/why this sort of corruption would occur?

  • We need to see your code that you are using to send the request etc. Bear in mind the XML part, which means you have to escape the < etc, that could be problem, but need to see code. – Liam Bailey Aug 20 '12 at 19:40

turns out to be a libxml2 bug due to an old version on our server. Luckily a fix exits: the LibXML2-fix plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.