aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-html-utils.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-11-08 05:27:34 +0800
committerDan Winship <danw@src.gnome.org>2003-11-08 05:27:34 +0800
commitd0549a4df4cf8a14647530e321ffd174fa320fad (patch)
treebbafbfea90a83bc62c536f407d3b9d5a71828fba /e-util/e-html-utils.c
parent7712cdb51e724bae2912158aa204d8bc4b664ad3 (diff)
downloadgsoc2013-evolution-d0549a4df4cf8a14647530e321ffd174fa320fad.tar.gz
gsoc2013-evolution-d0549a4df4cf8a14647530e321ffd174fa320fad.tar.zst
gsoc2013-evolution-d0549a4df4cf8a14647530e321ffd174fa320fad.zip
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
Diffstat (limited to 'e-util/e-html-utils.c')
-rw-r--r--e-util/e-html-utils.c10
1 files changed, 10 insertions, 0 deletions
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" },
{ "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);