From 888965285486dbe274238c1b6062ed89986676a8 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 5 Dec 2008 04:22:08 +0000 Subject: ** Fixes bug #562886 2008-12-04 Matthew Barnes ** Fixes bug #562886 * composer/e-msg-composer (handle_mailto): Don't double-decode attachment URIs. Also, parse & correctly. svn path=/trunk/; revision=36834 --- composer/e-msg-composer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'composer/e-msg-composer.c') diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 6dc926123b..95bd545a42 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -3862,16 +3862,19 @@ handle_mailto (EMsgComposer *composer, const gchar *mailto) clen = strcspn (p, "&"); content = g_strndup (p, clen); - camel_url_decode (content); if (!g_ascii_strcasecmp (header, "to")) { + camel_url_decode (content); to = add_recipients (to, content); } else if (!g_ascii_strcasecmp (header, "cc")) { + camel_url_decode (content); cc = add_recipients (cc, content); } else if (!g_ascii_strcasecmp (header, "bcc")) { + camel_url_decode (content); bcc = add_recipients (bcc, content); } else if (!g_ascii_strcasecmp (header, "subject")) { g_free (subject); + camel_url_decode (content); if (g_utf8_validate (content, -1, NULL)) { subject = content; content = NULL; @@ -3885,6 +3888,7 @@ handle_mailto (EMsgComposer *composer, const gchar *mailto) } } else if (!g_ascii_strcasecmp (header, "body")) { g_free (body); + camel_url_decode (content); if (g_utf8_validate (content, -1, NULL)) { body = content; content = NULL; @@ -3918,6 +3922,7 @@ handle_mailto (EMsgComposer *composer, const gchar *mailto) /* ignore */ } else { /* add an arbitrary header? */ + camel_url_decode (content); e_msg_composer_add_header (composer, header, content); } @@ -3926,7 +3931,7 @@ handle_mailto (EMsgComposer *composer, const gchar *mailto) p += clen; if (*p == '&') { p++; - if (!strcmp (p, "amp;")) + if (!g_ascii_strncasecmp (p, "amp;", 4)) p += 4; } } -- cgit