aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-07-09 21:57:54 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-07-09 21:57:54 +0800
commit31357665004adb9dfba27366bbe5df413aff8cb3 (patch)
tree729a2fa12f6251292e20a531b720a3d8ec0b4109 /mail/em-format-html.c
parentc892d0d8038b2584772b1673cf9de296ba44fff8 (diff)
downloadgsoc2013-evolution-31357665004adb9dfba27366bbe5df413aff8cb3.tar.gz
gsoc2013-evolution-31357665004adb9dfba27366bbe5df413aff8cb3.tar.zst
gsoc2013-evolution-31357665004adb9dfba27366bbe5df413aff8cb3.zip
Fix for bug #61199.
2004-07-07 Jeffrey Stedfast <fejj@novell.com> Fix for bug #61199. * em-format-html.c (efh_format_address): Same. * em-format-quote.c (emfq_format_address): Make sure 'real' isn't NULL before using. svn path=/trunk/; revision=26606
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 824d3b115d..0cb3e15cb2 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1433,11 +1433,14 @@ efh_format_address (GString *out, struct _camel_header_address *a)
g_string_append_printf (out, "%s &lt;", name);
/* rfc2368 for mailto syntax and url encoding extras */
- real = camel_header_encode_phrase(a->name);
- mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr);
- g_free(real);
- mailto = camel_url_encode(mailaddr, "?=&()");
- g_free(mailaddr);
+ if ((real = camel_header_encode_phrase (a->name))) {
+ mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr);
+ g_free (real);
+ mailto = camel_url_encode (mailaddr, "?=&()");
+ g_free (mailaddr);
+ } else {
+ mailto = camel_url_encode (a->v.addr, "?=&()");
+ }
} else {
mailto = camel_url_encode (a->v.addr, "?=&()");
}