aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog7
-rw-r--r--e-util/e-html-utils.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index e0d110647d..cd2d2f1615 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,10 @@
+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)
+
2001-07-05 Not Zed <NotZed@Ximian.com>
* e-memory.c: Added some malloc check stuff.
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;
}