aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-string-parser.c
diff options
context:
space:
mode:
authorVitaly Minko <vitaly.minko@gmail.com>2010-11-01 23:55:00 +0800
committerVitaly Minko <vitaly.minko@gmail.com>2010-11-01 23:55:00 +0800
commit6f6c118815634fa3ddbd62df46e7447341a81f5b (patch)
treec7f7c3dc343aff7c88649678bb295954dc123170 /libempathy-gtk/empathy-string-parser.c
parent68e5dfaa9c4e5ee49efa13421eb9fc4dfdb04077 (diff)
downloadgsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.gz
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.bz2
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.lz
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.xz
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.zst
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.zip
String parser is changed in order not to break URLs at apostrophes.
Diffstat (limited to 'libempathy-gtk/empathy-string-parser.c')
-rw-r--r--libempathy-gtk/empathy-string-parser.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-string-parser.c b/libempathy-gtk/empathy-string-parser.c
index 45ae6a720..3bb6a82be 100644
--- a/libempathy-gtk/empathy-string-parser.c
+++ b/libempathy-gtk/empathy-string-parser.c
@@ -27,14 +27,14 @@
#include "empathy-ui-utils.h"
#define SCHEMES "([a-zA-Z\\+]+)"
-#define INVALID_CHARS "\\s\"'"
-#define INVALID_CHARS_EXT INVALID_CHARS "\\[\\]<>(){},;:?"
-#define BODY "([^"INVALID_CHARS"]+)"
-#define BODY_END "([^"INVALID_CHARS"]*)[^"INVALID_CHARS_EXT".]"
-#define BODY_STRICT "([^"INVALID_CHARS_EXT"]+)"
+#define INVALID_CHARS "\\s\"<>"
+#define INVALID_CHARS_EXT INVALID_CHARS "\\[\\](){},;:"
+#define INVALID_CHARS_FULL INVALID_CHARS_EXT "?'"
+#define BODY "([^"INVALID_CHARS_FULL"])([^"INVALID_CHARS_EXT"]*)"
+#define BODY_END "([^"INVALID_CHARS"]*)[^"INVALID_CHARS_FULL".]"
#define URI_REGEX "("SCHEMES"://"BODY_END")" \
"|((www|ftp)\\."BODY_END")" \
- "|((mailto:)?"BODY_STRICT"@"BODY"\\."BODY_END")"
+ "|((mailto:)?"BODY"@"BODY"\\."BODY_END")"
static GRegex *
uri_regex_dup_singleton (void)