[empathy/gnome-2-28] Make sure double quotes are not considered part of URIs



commit 9880892d6053e86e3d4ea648142668e95371f02e
Author: Gustavo Noronha Silva <gustavo noronha collabora co uk>
Date:   Tue Nov 24 14:27:58 2009 -0200

    Make sure double quotes are not considered part of URIs
    
    The fact that the URI regex we use to detect URIs in chat
    conversations does not exclude double quotes causes it to pick up more
    of the text than it should, in some cases.
    
    Bug #598381

 libempathy-gtk/empathy-ui-utils.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index aeb665c..8d3cd59 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -51,8 +51,8 @@
 
 #define SCHEMES "(https?|s?ftps?|nntp|news|javascript|about|ghelp|apt|telnet|"\
 		"file|webcal|mailto)"
-#define BODY "([^\\ \\n]+)"
-#define END_BODY "([^\\ \\n]*[^,;\?><()\\ \"\\.\\n])"
+#define BODY "([^\\ \\n\"]+)"
+#define END_BODY "([^\\ \\n\"]*[^,;\?><()\\ \"\\.\\n])"
 #define URI_REGEX "("SCHEMES"://"END_BODY")" \
 		  "|((mailto:)?"BODY"@"BODY"\\."END_BODY")"\
 		  "|((www|ftp)\\."END_BODY")"



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