• I am using python-wordpress-xmlrpc to post content to a wordpress blog, the documentation is good except that it only shows trivial plain text content, as in

    `post.content = ‘This is a wonderful blog post about XML-RPC.’

    If I use HTML markup in content then the HTML tags get escaped (converted to “&lt ;” etc), and so do not display properly. Can anyone suggest a way to avoid this?

    The only previous question I can see on the topic is this one from five years ago, which seems restricted to a bug in a specific version of lxml (and which must be fixed in new versions of WordPress).

Viewing 1 replies (of 1 total)
  • Just figured it out tomslee.

    It’s three double quotes before and after your html code.

    Try the following.

    post.content = """
    <all your html code here>
    blah
    blah
    blah
    
    """
Viewing 1 replies (of 1 total)

The topic ‘python-wordpress-xmlrpc: html content getting escaped’ is closed to new replies.