GNOME Bugzilla – Bug 609942
URLs are split at apostrophes
Last modified: 2010-11-02 09:05:54 UTC
If you have a url such as http://foo.com/bar'baz.jpg (which works fine in browsers usually), it breaks. Maybe there are other characters that also "break" the URLs, I haven't tested fully. This might be related to bug #607032
Created attachment 170764 [details] [review] proposed fix According to http://www.ietf.org/rfc/rfc1738.txt, apostrophe is allowed in URLs with http/ftp and mailto schemas.
You should add ' in INVALID_CHARS_EXT then, to avoid matching the ' when being at the of the URL. For example if you are sending HTML code like that: <a href='http://google.com'> Please aslo add test cases in empathy/tests/empathy-parser-test.c
Created attachment 170856 [details] [review] updated patch Fixed. I added "<>" to INVALID_CHARS in order to handle <a> tags in comments properly. These chars are not allowed neither in http nor in email links. I also separated "?'" from INVALID_CHARS_EXT since these chars are not forbidden in local-part of mailto links according to http://tools.ietf.org/html/rfc5322#section-3.4.1
Ping
Looks fine Just a little detail, I would remove BODY_START and make BODY_STRICT "([^"INVALID_CHARS_FULL"])([^"INVALID_CHARS_EXT"]*)" to avoid having too much different BODY_FOO defined that make things messy. Also I'm wondering why we have BODY, it is used only for the server part in email addresses. Shouldn't it be BODY_STRICT too? If you agree we could just remove BODY and rename BODY_STRICT to BODY.
Agreed. Updated in repo: git://vminko.org/empathy branch: fix-609942
Looks fine, you can merge that branch :)
I merged it as Vitaly doesn't have a GNOME account. Thanks to both of you guys! This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.