After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 102881 - URLs with commas not parsed completely
URLs with commas not parsed completely
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
0.13.3
Other Linux
: Normal normal
: 0.13.4
Assigned To: Charles Kerr
Pan QA Team
: 105269 106436 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-01-08 22:28 UTC by holger
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description holger 2003-01-08 22:28:47 UTC
URLs in the message body are automagically turned into clickable 
hyperlinks. It seems the URL parser reproducibly stops at the first comma 
it finds, although this is a valid character in hyperlinks, so any link 
into e.g. time.com will be cut off right before the first comma.
Comment 1 Christophe Lambin 2003-01-09 20:54:31 UTC
fejj: we're using gmime's url_extract() for this. Any objection
against the following patch?

diff -u -r1.6 gmime-filter-html.c
--- gmime-filter-html.c	30 Dec 2002 21:33:30 -0000	1.6
+++ gmime-filter-html.c	9 Jan 2003 20:54:24 -0000
@@ -113,12 +113,12 @@
 }
 
 /* 1 = non-email-address chars: "()<>@,;:\\\"/[]`'|\n\t "  */
-/* 2 = non-url chars:           "()<>,;\\\"[]`'|\n\t "   */
+/* 2 = non-url chars:           "()<>;\\\"[]`'|\n\t "   */
 /* 3 = trailing url garbage:    ",.!?;:>)]}\\`'-_|\n\t "  */
 static unsigned short special_chars[256] = {
 	 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0,
 	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	 7, 4, 3, 0, 0, 0, 0, 7, 3, 7, 0, 0, 7, 4, 4, 1,
+	 7, 4, 3, 0, 0, 0, 0, 7, 3, 7, 0, 0, 4, 4, 4, 1,
 	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 7, 3, 0, 7, 4,
 	 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 7, 3, 0, 4,
@@ -140,7 +140,7 @@
 #define IS_GARBAGE    (1 << 2)
 
 #define NON_EMAIL_CHARS         "()<>@,;:\\\"/[]`'|\n\t "
-#define NON_URL_CHARS           "()<>,;\\\"[]`'|\n\t "
+#define NON_URL_CHARS           "()<>;\\\"[]`'|\n\t "
 #define TRAILING_URL_GARBAGE    ",.!?;:>)}\\`'-_|\n\t "
 
 #define is_addr_char(c) (isprint ((int) c) &&
!(special_chars[(unsigned char) c] & IS_NON_ADDR))
Comment 2 Jeffrey Stedfast 2003-01-09 21:08:39 UTC
you can do whatever you want to your copy of gmime-filter-html.c ;-)

I've rewritten gmime's gmime-filter-html.c tho, the code is now much
cleaner...

you guys may actually want to update to using the newer code (though
it doesn't offer a url_extract() function anymore which I seem to
recall charles asking me to make public at one point, but instead I do
have something even better - take a look at url-scanner.c)
Comment 4 Charles Kerr 2003-02-13 19:19:26 UTC
*** Bug 105269 has been marked as a duplicate of this bug. ***
Comment 5 Charles Kerr 2003-02-18 22:08:10 UTC
*** Bug 106436 has been marked as a duplicate of this bug. ***