aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-html-utils.c16
2 files changed, 15 insertions, 7 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 772b217582..27ee510d5a 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,5 +1,11 @@
2001-04-23 Jon Trowbridge <trow@ximian.com>
+ * e-html-utils.c (e_text_to_html_full): Removed attempts to use
+ Radek's evil <DATA> hacks, which were just causing me
+ (and GtkHTML) grief.
+
+2001-04-23 Jon Trowbridge <trow@ximian.com>
+
* e-host-utils.c: Include glib.h, so that the g_warning in
e_gethostbyname_r will be treated as a macro and not as an
unresolved symbol.
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c
index 4bcfc920b0..c9c116e754 100644
--- a/e-util/e-html-utils.c
+++ b/e-util/e-html-utils.c
@@ -65,12 +65,15 @@ url_extract (const unsigned char **text, gboolean check)
return out;
}
-/* FIXME */
+/* FIXME -- this should be smarter */
static gboolean
is_email_address (const unsigned char *c)
{
gboolean seen_at = FALSE, seen_postat = FALSE;
+ if (c == NULL)
+ return FALSE;
+
if (*c == '<')
++c;
@@ -100,6 +103,9 @@ email_address_extract (const unsigned char **text)
const unsigned char *end = *text;
char *out;
+ if (end == NULL)
+ return NULL;
+
while (*end && !isspace (*end) && (*end != '>') && (*end < 0x80))
++end;
@@ -293,12 +299,8 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color)
dispaddr = e_text_to_html (addr, 0);
if (addr) {
- gchar *outaddr = g_strdup_printf ("<a href=\"mailto:%s\">"
- "<!--+GtkHTML:<DATA class=\"Text\" key=\"email\" value=\"%s\">-->"
- "%s"
- "<!--+GtkHTML:<DATA class=\"Text\" clear=\"email\">--> "
- "</a>",
- addr, addr, dispaddr);
+ gchar *outaddr = g_strdup_printf ("<a href=\"mailto:%s\">%s</a>",
+ addr, dispaddr);
out = check_size (&buffer, &buffer_size, out, strlen(outaddr));
out += sprintf (out, "%s", outaddr);
col += strlen (addr);