aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-12-10 00:19:44 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-12-10 00:19:44 +0800
commit2daa1a186e12e944e64c2eaceb1bdcffcdeb1eba (patch)
tree0107bd241a687d69093e6842f47981e06282d634
parentfa546c34576eafba2426326bab805b45f005dac3 (diff)
downloadgsoc2013-empathy-2daa1a186e12e944e64c2eaceb1bdcffcdeb1eba.tar
gsoc2013-empathy-2daa1a186e12e944e64c2eaceb1bdcffcdeb1eba.tar.gz
gsoc2013-empathy-2daa1a186e12e944e64c2eaceb1bdcffcdeb1eba.tar.bz2
gsoc2013-empathy-2daa1a186e12e944e64c2eaceb1bdcffcdeb1eba.tar.lz
gsoc2013-empathy-2daa1a186e12e944e64c2eaceb1bdcffcdeb1eba.tar.xz
gsoc2013-empathy-2daa1a186e12e944e64c2eaceb1bdcffcdeb1eba.tar.zst
gsoc2013-empathy-2daa1a186e12e944e64c2eaceb1bdcffcdeb1eba.zip
Improve URI regex.
svn path=/trunk/; revision=1956
-rw-r--r--libempathy-gtk/empathy-theme.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-theme.c b/libempathy-gtk/empathy-theme.c
index fdff379ee..429e3cfbe 100644
--- a/libempathy-gtk/empathy-theme.c
+++ b/libempathy-gtk/empathy-theme.c
@@ -35,12 +35,12 @@
#define TIMESTAMP_INTERVAL 300
#define SCHEMES "(https?|ftps?|nntp|news|javascript|about|ghelp|apt|telnet|"\
- "file|webcal|mailto)"
-#define SEPARATOR "([^,;\?><()\\ ])"
-#define BODY "([^\\ ]*(\\\\ )?)+"
+ "file|webcal|mailto)"
+#define SEPARATOR "([^,;\?><()\\ \"\\.])"
+#define BODY "([^\\ ]+)"
#define URI_REGEX "("SCHEMES"://"BODY SEPARATOR")" \
"|((mailto:)?"BODY"@"BODY"\\."BODY SEPARATOR")"\
- "|((www|ftp)."BODY SEPARATOR")"
+ "|((www|ftp)\\."BODY SEPARATOR")"
static GRegex *uri_regex = NULL;
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyTheme)