diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-07-12 13:42:49 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-07-12 13:42:49 +0800 |
commit | 7e05144bba4e61758d968f266614b585f25e2c5f (patch) | |
tree | 4a73e1c7599f3ba9e2bf6df7a1f04c52ef344b78 /e-util/e-html-utils.c | |
parent | b88f6b9593ad0a6fda85ca8d01b623583f714bcc (diff) | |
download | gsoc2013-evolution-7e05144bba4e61758d968f266614b585f25e2c5f.tar.gz gsoc2013-evolution-7e05144bba4e61758d968f266614b585f25e2c5f.tar.zst gsoc2013-evolution-7e05144bba4e61758d968f266614b585f25e2c5f.zip |
Added is_addr_char_no_pipes macro, which specifically does not consider
2001-07-12 Jon Trowbridge <trow@ximian.com>
* e-html-utils.c: Added is_addr_char_no_pipes macro, which
specifically does not consider '|' ("pipe") to be a legal address
character.
(email_address_extract): Use is_addr_char_no_pipes when looking
for e-mail addresses to turn into HTML links. (Bug #3940)
svn path=/trunk/; revision=11029
Diffstat (limited to 'e-util/e-html-utils.c')
-rw-r--r-- | e-util/e-html-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index ca918f231a..ac4e35c0f6 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -54,6 +54,7 @@ static int special_chars[] = { }; #define is_addr_char(c) (isprint (c) && !(special_chars[c] & 1)) +#define is_addr_char_no_pipes(c) (is_addr_char(c) && (c) != '|') #define is_trailing_garbage(c) (!isprint(c) || (special_chars[c] & 2)) static char * @@ -88,13 +89,13 @@ email_address_extract (const unsigned char **cur, char **out, const unsigned cha char *addr; /* *cur points to the '@'. Look backward for a valid local-part */ - for (start = *cur; start - 1 >= linestart && is_addr_char (*(start - 1)); start--) + for (start = *cur; start - 1 >= linestart && is_addr_char_no_pipes (*(start - 1)); start--) ; if (start == *cur) return NULL; /* Now look forward for a valid domain part */ - for (end = *cur + 1, dot = NULL; is_addr_char (*end); end++) { + for (end = *cur + 1, dot = NULL; is_addr_char_no_pipes (*end); end++) { if (*end == '.' && !dot) dot = end; } |