From d0549a4df4cf8a14647530e321ffd174fa320fad Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 7 Nov 2003 21:27:34 +0000 Subject: Removed. No longer used by evolution except via evolution-data-server. * ename/*: Removed. No longer used by evolution except via evolution-data-server. * Makefile.am (SUBDIRS): Remove ename svn path=/trunk/; revision=23232 --- e-util/e-html-utils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'e-util/e-html-utils.c') diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index 04042316e4..762627b259 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -63,6 +63,9 @@ static int special_chars[] = { #define is_trailing_garbage(c) (c > 127 || (special_chars[c] & 2)) #define is_domain_name_char(c) (c < 128 && (special_chars[c] & 4)) +/* (http|https|ftp|nntp)://[^ "|/]+\.([^ "|]*[^ ,.!?;:>)\]}`'"|_-])+ */ +/* www\.[A-Za-z0-9.-]+(/([^ "|]*[^ ,.!?;:>)\]}`'"|_-])+) */ + static char * url_extract (const unsigned char **text, gboolean full_url) { @@ -107,6 +110,9 @@ email_address_extract (const unsigned char **cur, char **out, const unsigned cha ; if (start == *cur) return NULL; + if (start > linestart + 2 && + start[-1] == ':' && start[0] == '/' && start[1] == '/') + return NULL; /* Now look forward for a valid domain part */ for (end = *cur + 1, dot = NULL; is_domain_name_char (*end); end++) { @@ -448,6 +454,7 @@ struct { { "Ends with http://www.foo.com", "http://www.foo.com" }, { "http://www.foo.com at start", "http://www.foo.com" }, { "http://www.foo.com.", "http://www.foo.com" }, + { "http://www.foo.com/.", "http://www.foo.com/" }, { "", "http://www.foo.com" }, { "(http://www.foo.com)", "http://www.foo.com" }, { "http://www.foo.com, 555-9999", "http://www.foo.com" }, @@ -464,11 +471,14 @@ struct { { "http://www.foo.com/index.html!", "http://www.foo.com/index.html" }, { "\"http://www.foo.com/index.html\"", "http://www.foo.com/index.html" }, { "'http://www.foo.com/index.html'", "http://www.foo.com/index.html" }, + { "http://bob@www.foo.com/bar/baz/", "http://bob@www.foo.com/bar/baz/" }, { "http no match http", NULL }, { "http: no match http:", NULL }, { "http:// no match http://", NULL }, + { "unrecognized://bob@foo.com/path", NULL }, { "src/www.c", NULL }, + { "Ewwwwww.Gross.", NULL }, }; int num_url_tests = G_N_ELEMENTS (url_tests); -- cgit