Angled brackets were being stripped with Ecto and Drupal 6

Following the upgrade to Drupal 6, I noticed an awkward error when publishing content from my desktop editor (Ecto 3). From what I've read, it will affect any editor that uploads content via the blog api integrated in Drupal 6.

How to resolve:

It looks like it's down to the version of libxml2 and php involved. You can either:

  1. Upgrade php & libxml2 if you have access to the server or
  2. Patch the xmlrpc.inc file in the includes folder of your Drupal 6 installation.

I went with option 2 and it's not as scary as it sounds.

  1. Backup the xmlrpc.inc file that resides on your Drupal 6 installation. You can do this through your Cpanel (or similar) file manager or with your ftp client. Copy it somewhere safe.
  2. Open the patch file from the Drupal issue page
  3. Edit the original xmlrpc.inc file and find the line that starts $xmlrpc_message->_parser = xml_parser_create();
  4. Insert the four lines with the "+" straight after this, but remove the "+" from the start of each line
  5. Check that the line in xmlrpc.inc that follows the inserted lines is // Set XML parser to take the case of tags into account.
  6. save the xmlrpc.inc file or upload it via your ftp client.
  7. post an article and check that it works (best to do this with no input filters so you can check what's being accepted by Drupal, not what's being presented back to you)

Trackback URL for this post:

http://www.awardsounds.co.uk/trackback/353