Coin web de Frédéric Péters

fpeters@0d.be

How I came to fix an evolution bug

23 octobre 2007, 23:24

Today at work I got a report about a problem with some internal tool; it would send an email with an URL and it "wouldn't work", it "would show a blank page" but no matter how I tested this I could not reproduce this, and I had been looking at another colleague using the exact same feature without any problem.

There was a quite frustrating exchange when I had to ask for each and every step taken, mostly questions which looked silly to the reporter and I finished by requesting a screenshot of his mail client with the offending message. And there it was, I was sending this:

<a href="http://www.example.com/?b&amp;c">b&amp;c</a>

and it would display b&amp;c instead of b&c; and the same lack of unescaping happened to the href element, pointing the user to http://www.example.com/?b&amp;c instead of http://www.example.com/?b&c.

I downloaded gtkhtml3 (since he is using Evolution while I am an old fart using mutt) and came up with a fix, which was directly conflicting with the fix for bug 270487 (which was necessary to handle not-properly-escaped HTML, what a rough world it is).

Easy patch out, I gave up for a few hours then decided I would better do come up with a patch if I ever wanted to see the thing fixed in a reasonable timeframe (#270487 was filed in December 2004, a patch was provided in February 2006 and commited in August 2007).

And I came up with a slightly more complicated patch (and not ideal but dealing with broken HTML has a price), which would handle both #270487 and "my" bug. And I am hopeful it won't take that long to get in.

For reference: http://bugzilla.gnome.org/show_bug.cgi?id=489452

Oh, I missed JDLL 2007 due to a big strike in France but I managed to get a few great days in the Cévennes.

South of CĂ©vennes

Cévennes, October 21st 2007