From 79dcf66c2f47307e622ae375cb3c8b1a788e75cc Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 31 Mar 2012 19:32:57 -0400 Subject: EMailRequest: Decode mail:// URIs when looking up a formatter. This is why I hate URIs... --- mail/e-mail-request.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c index 3fe54c6119..a99240e15c 100644 --- a/mail/e-mail-request.c +++ b/mail/e-mail-request.c @@ -639,9 +639,13 @@ mail_request_send_async (SoupRequest *request, /* Get HTML content of given PURI part */ if (g_strcmp0 (uri->scheme, "mail") == 0) { gchar *uri_str; + gchar *decoded_uri; - uri_str = g_strdup_printf ("%s://%s%s", uri->scheme, uri->host, uri->path); - emr->priv->efh = g_hash_table_lookup (formatters, uri_str); + uri_str = g_strdup_printf ( + "%s://%s%s", uri->scheme, uri->host, uri->path); + decoded_uri = soup_uri_decode (uri_str); + emr->priv->efh = g_hash_table_lookup (formatters, decoded_uri); + g_free (decoded_uri); g_free (uri_str); g_return_if_fail (emr->priv->efh); -- cgit