[evolution-patches] Fix for bug #256142 [gtkhtml]



Hi

Attached Fix for bug#256142 - URL parser doesn't properly parse
trailing . in hostnames.

Please Review

Thanks,
Rohini

Index: htmltext.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmltext.c,v
retrieving revision 1.285
diff -u -p -r1.285 htmltext.c
--- htmltext.c	26 Sep 2005 07:07:21 -0000	1.285
+++ htmltext.c	4 Jan 2006 09:46:23 -0000
@@ -2933,9 +2933,9 @@ struct _HTMLMagicInsertMatch
 typedef struct _HTMLMagicInsertMatch HTMLMagicInsertMatch;
 
 static HTMLMagicInsertMatch mim [] = {
-	{ "(news|telnet|nttp|file|http|ftp|https)://([-a-z0-9]+(:[-a-z0-9]+)?@)?[-a-z0-9.]+[-a-z0-9](:[0-9]*)?(/[-a-z0-9_$.+!*(),;:@%&=?/~#]*[^]'.}>\\) ,?!;:\"]?)?", NULL, NULL },
-	{ "www\\.[-a-z0-9.]+[-a-z0-9](:[0-9]*)?(/[-A-Za-z0-9_$.+!*(),;:@%&=?/~#]*[^]'.}>\\) ,?!;:\"]?)?", NULL, "http://"; },
-	{ "ftp\\.[-a-z0-9.]+[-a-z0-9](:[0-9]*)?(/[-A-Za-z0-9_$.+!*(),;:@%&=?/~#]*[^]'.}>\\) ,?!;:\"]?)?", NULL, "ftp://"; },
+	{ "(news|telnet|nttp|file|http|ftp|https)://([-a-z0-9]+(:[-a-z0-9]+)?@)?[-a-z0-9.]+[-a-z0-9](:[0-9]*)?(([.])?/[-a-z0-9_$.+!*(),;:@%&=?/~#]*[^]'.}>\\) ,?!;:\"]?)?", NULL, NULL },
+	{ "www\\.[-a-z0-9.]+[-a-z0-9](:[0-9]*)?(([.])?/[-A-Za-z0-9_$.+!*(),;:@%&=?/~#]*[^]'.}>\\) ,?!;:\"]?)?", NULL, "http://"; },
+	{ "ftp\\.[-a-z0-9.]+[-a-z0-9](:[0-9]*)?(([.])?/[-A-Za-z0-9_$.+!*(),;:@%&=?/~#]*[^]'.}>\\) ,?!;:\"]?)?", NULL, "ftp://"; },
 	{ "[-_a-z0-9.'\\+]+ [-_a-z0-9 ]+", NULL, "mailto:"; }
 };
 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2151
diff -u -p -r1.2151 ChangeLog
--- ChangeLog	22 Oct 2005 10:25:26 -0000	1.2151
+++ ChangeLog	4 Jan 2006 09:46:33 -0000
@@ -1,3 +1,9 @@
+2006-01-04  Rohini S  <srohini novell com>
+
+	* htmltext.c: Regular expressions in HTMLMagicInsertMatch array mim changed
+
+	Fixes bug #256142
+
 2005-10-22  Kaushal Kumar  <kakumar novell com>
 
 	* htmlprinter.c (draw_border): Do not draw peripheral border since


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]