diff -ur empathy-2.31.92/libempathy-gtk/empathy-string-parser.c empathy-2.31.92.patched/libempathy-gtk/empathy-string-parser.c --- empathy-2.31.92/libempathy-gtk/empathy-string-parser.c 2010-08-30 15:29:37.000000000 +0400 +++ empathy-2.31.92.patched/libempathy-gtk/empathy-string-parser.c 2010-09-22 20:33:25.000000000 +0400 @@ -27,14 +27,16 @@ #include "empathy-ui-utils.h" #define SCHEMES "([a-zA-Z\\+]+)" -#define INVALID_CHARS "\\s\"'" -#define INVALID_CHARS_EXT INVALID_CHARS "\\[\\]<>(){},;:?" +#define INVALID_CHARS "\\s\"<>" +#define INVALID_CHARS_EXT INVALID_CHARS "\\[\\](){},;:" +#define INVALID_CHARS_FULL INVALID_CHARS_EXT "?'" #define BODY "([^"INVALID_CHARS"]+)" -#define BODY_END "([^"INVALID_CHARS"]*)[^"INVALID_CHARS_EXT".]" -#define BODY_STRICT "([^"INVALID_CHARS_EXT"]+)" +#define BODY_END "([^"INVALID_CHARS"]*)[^"INVALID_CHARS_FULL".]" +#define BODY_START "([^"INVALID_CHARS_FULL"])" +#define BODY_STRICT "([^"INVALID_CHARS_EXT"]*)" #define URI_REGEX "("SCHEMES"://"BODY_END")" \ "|((www|ftp)\\."BODY_END")" \ - "|((mailto:)?"BODY_STRICT"@"BODY"\\."BODY_END")" + "|((mailto:)?"BODY_START""BODY_STRICT"@"BODY"\\."BODY_END")" static GRegex * uri_regex_dup_singleton (void) diff -ur empathy-2.31.92/tests/empathy-parser-test.c empathy-2.31.92.patched/tests/empathy-parser-test.c --- empathy-2.31.92/tests/empathy-parser-test.c 2010-08-06 12:42:12.000000000 +0400 +++ empathy-2.31.92.patched/tests/empathy-parser-test.c 2010-09-22 21:10:29.000000000 +0400 @@ -44,6 +44,8 @@ "http://foo.com; bar", "[http://foo.com]; bar", "http://foo.com: bar", "[http://foo.com]: bar", "http://foo.com:bar", "[http://foo.com:bar]", + "http://apos'foo.com", "[http://apos'foo.com]", + "mailto:bar'?user@server.com", "[mailto:bar'?user@server.com]", /* They are not links! */ "http://", "http[:/]/", /* Hm... */ @@ -54,7 +56,7 @@ "mailto:user@.com", "mailto:user@.com", "user@.com", "user@.com", - /* Links inside (), {}, [], <> or "" */ + /* Links inside (), {}, [], <>, "" or '' */ /* FIXME: How to test if the ending ] is matched or not? */ "Foo (www.foo.com)", "Foo ([www.foo.com])", "Foo {www.foo.com}", "Foo {[www.foo.com]}", @@ -68,6 +70,8 @@ "Foo [user@server.com]", "Foo [[user@server.com]]", "Foo ", "Foo <[user@server.com]>", "Foo \"user@server.com\"", "Foo "[user@server.com]"", + "bar", "<a href='[http://apos'foo.com]'>bar</a>", + "Foo 'bar'?user@server.com'", "Foo '[bar'?user@server.com]'", /* Basic smileys */ "a:)b", "a[:)]b", Only in empathy-2.31.92.patched/tests: test-report.xml