Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Minor bug fix in IXR

I’ve fixed a small but vital bug in the Incutio XML-RPC library. The library was causing errors when certain unicode characters were used in strings. This is because I was using PHP’s htmlentities() function to encode strings before transmission. This escapes all of the characters that need escaping (<, >, &, " and ’) but also escapes a number of other characters that have an HTML entity equivalent. The problem is that these additional entities are defined in HTML but not in XML, so XML parsers were choking on them when they tried to parse the resulting message. I’ve fixed the bug now by switching to using htmlspecialchars() instead. Thanks to the several people who reported this one (it took me a while to figure out) and to Marc Logemann who’s blog entry finally helped me crack it.

This is Minor bug fix in IXR by Simon Willison, posted on 11th July 2003.

View blog reactions

Next: In Germany

Previous: Sitting nervously on the fence

2 comments

  1. I have begun playing with the IXR library, and I was wondering if there was any reason it would not work with an HTTPS connection? Thanks, -t

    Tim - 20th October 2003 05:13 - #

  2. Hey, I fixed this bug a long time ago, but they never included it in their release.

    zimbatm - 14th October 2005 12:08 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2003/07/11/minorBugFix

A django site