Fixing the WordPress 2.7 XML-RPC issue

Computing

There’s an annoying issue with the latest version of WordPress. If you use the XML-RPC interface to post blog posts (anyone using Windows Live Writer, w.bloggar, or any other desktop blogging software) you’ll notice that < and > tags are stripped from the output. This means formatting in posts will be screwed up, and you’ll see bits of HTML tags everywhere. If your paragraphs suddenly end with /p, then this is probably the bug which is causing it.

The cause of the problem is libxml2 version 2.7.0 and newer, which for some reason changes the way that some bits of text are stripped. Libxml2 is used by PHP to handle XML parsing.

There are a few ways to fix this, wait for the new version of PHP (it’s fixed in 5.2.9), downgrade your copy of libxml2 to a version before 2.7.0, or hack WordPress so it won’t get libxml2 to parse angle brackets. The third option is the easiest. :P

This patch will fix your XMLRPC issues. The only thing is you will need to update the code to check for libxml version 2.7.3 as well. This can be done by adding || to the end of the lines ending with 2.7.2 and adding a line underneath, "LIBXML_DOTTED_VERSION == ‘2.7.3′ ". Re-upload the new class-ixr.php and rss.php and you’ll be good to go. :)

–Ben

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Slashdot
  • StumbleUpon
  • TwitThis
  • Print this article!
  • Reddit
Explore posts in the same categories: Computing

Comment: