GNOME Bugzilla – Bug 485700
evolution: URLs with ampersand ("&") don't work
Last modified: 2008-07-17 10:51:37 UTC
The bug has been opened on https://bugs.launchpad.net/bugs/149964 "... I am using Gutsy Gibbon. Since a few weeks some URLs in e-mails get somehow corrupted when clicked on. I can repro this as follows with the e-mails I regularily get from an eBay search subscription: 1. open evolution 2. open an arbitrary e-mail received from eBay 3. click on an arbitrary link to an eBay item 4. result: eBay prints "ungültiger Artikel" (in english: "invalid item"), since the URL is no longer correct. This is a bug of evolution. I have tested exactly the same e-mail (from my central IMAP mailbox) using Thunderbird and it works perfectly. I also forwarded this e-mail to my Windows machine at work and also no problem. Here is a sample URL (shown in the firefox window) when clicked on the link from Thunderbird: http://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&item=150168307117&ssPageName=ADME:B:SS:DE:1 And here is the result I get when clicked on the link from evolution leading to the "invalid item" message in eBay: http://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&item=150168307117&ssPageName=ADME:B:SS:DE:1 Do you see the difference ? The character "&" is changed to "&", i.e. the HTML equivalent of the ampersand sign, which obviously no longer works and leads to a malformed URL. ... http://launchpadlibrarian.net/9858549/Meine%20eBay-Suche%3A%20Sinclair%20%28evolution%29.eml attached is the mail exported by evolution - hope this is possible to import. Otherwise I can forward you this e-mail (using Thunderbird and/or evolution ?). The preferred browser command is "use the preferences of the browser". The default browser is, of course, firefox. ..."
this works fine in evo 2.10.1, so I guess the bug must have been introduced somewhere in 2.11... hope this helps tracking it down.
probably already filed under gtkhtml
I looked to the gtkhtml bugs without sending this one there was no obvious duplicate there
I'm seeing this too on Fedora 8. The Fedora bug report is here: https://bugzilla.redhat.com/show_bug.cgi?id=313061 It includes an mbox format ebay email showing the problem.
probably because of Bug 270487
Created attachment 97412 [details] [review] proposed gtkhtml patch for gtkhtml; I added new files to gtkhtml, src/htmlutils.[h/c], to store helper functions. When testing, please forget old mails, where are not properly escaped ampersands in url (href), there is not much what one can do, but when you will add new urls, then it will be internally properly escaped and when passing to ON_URL or LINK_CLICKED then it will be unescaped. (I hope it makes sense a bit.)
*** Bug 489452 has been marked as a duplicate of this bug. ***
Created attachment 97783 [details] [review] proposed gtkhtml patch ][ for gtkhtml; As Frederic pointed in bug 489452, patch here doesn't cover all what it should, so I'm attaching here improved patch to fix issue he mentioned. Thanks for help, Frederic.
Seems to fix all issues, thanks Milan.
Milan commit to stable/head.
Committed to trunk. Committed revision 8605. Committed to stable. Committed revision 8606.
*** Bug 489984 has been marked as a duplicate of this bug. ***
*** Bug 486852 has been marked as a duplicate of this bug. ***