aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gustavo.noronha@collabora.co.uk>2009-11-25 00:27:58 +0800
committerGustavo Noronha Silva <gustavo.noronha@collabora.co.uk>2009-11-25 00:45:18 +0800
commitd6c023acb730fd74dab269fd3f5883b0e655de5f (patch)
tree85f329e23b27c5dc02a0cfccf87f0b89f80b9dfc
parentd7737fbc077b6e1a5af4446cbda759cad0e22e95 (diff)
downloadgsoc2013-empathy-d6c023acb730fd74dab269fd3f5883b0e655de5f.tar
gsoc2013-empathy-d6c023acb730fd74dab269fd3f5883b0e655de5f.tar.gz
gsoc2013-empathy-d6c023acb730fd74dab269fd3f5883b0e655de5f.tar.bz2
gsoc2013-empathy-d6c023acb730fd74dab269fd3f5883b0e655de5f.tar.lz
gsoc2013-empathy-d6c023acb730fd74dab269fd3f5883b0e655de5f.tar.xz
gsoc2013-empathy-d6c023acb730fd74dab269fd3f5883b0e655de5f.tar.zst
gsoc2013-empathy-d6c023acb730fd74dab269fd3f5883b0e655de5f.zip
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
-rw-r--r--libempathy-gtk/empathy-ui-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 9ba01738d..ce5ec419e 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")"