aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog7
-rw-r--r--composer/e-msg-composer.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index b258637da4..7a08fc49ae 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-04 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes bug #562886
+
+ * e-msg-composer (handle_mailto):
+ Don't double-decode attachment URIs. Also, parse &amp; correctly.
+
2008-11-07 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #559701
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;
}
}