Post HTML data via XMLRPC in Python? Post HTML data via XMLRPC in Python? wordpress wordpress

Post HTML data via XMLRPC in Python?


Could the HTML data you are uploading already have its angle brackets escaped into HTML entities? I.e. < becomes < while > becomes >

This would lead to the behavior you describe. The visual editor would show what looks like raw HTML, not the result of rendering HTML.

To fix, either (i) prevent that encoding, or (ii) the quick and dirty approach, do a search and replace on the HTML before handing to your API. Something along the lines of:

html = html.replace('<', '<')html = html.replace('>', '>') 

should do the trick.