aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-10-19 00:03:49 +0800
committerMilan Crha <mcrha@redhat.com>2012-10-19 00:03:49 +0800
commitfb9b2232599f9cb3aa35c1d851f3926c54c469c5 (patch)
treec1873d5df53e3823bedd9061b07faeffe56e14db
parent90187051ee6beffc101ee840e282cd0e95302f2a (diff)
downloadgsoc2013-evolution-fb9b2232599f9cb3aa35c1d851f3926c54c469c5.tar
gsoc2013-evolution-fb9b2232599f9cb3aa35c1d851f3926c54c469c5.tar.gz
gsoc2013-evolution-fb9b2232599f9cb3aa35c1d851f3926c54c469c5.tar.bz2
gsoc2013-evolution-fb9b2232599f9cb3aa35c1d851f3926c54c469c5.tar.lz
gsoc2013-evolution-fb9b2232599f9cb3aa35c1d851f3926c54c469c5.tar.xz
gsoc2013-evolution-fb9b2232599f9cb3aa35c1d851f3926c54c469c5.tar.zst
gsoc2013-evolution-fb9b2232599f9cb3aa35c1d851f3926c54c469c5.zip
Encode also message_uid in e_mail_part_build_uri()
This reverts commit ebc86adc4f30, which broke opening of IMAP message. It's also the correct solution for the initial issue, because the message_uid can contain letters which should be encoded in the URI.
-rw-r--r--em-format/e-mail-part-utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/em-format/e-mail-part-utils.c b/em-format/e-mail-part-utils.c
index 0d96d56085..9c7c91301f 100644
--- a/em-format/e-mail-part-utils.c
+++ b/em-format/e-mail-part-utils.c
@@ -358,7 +358,7 @@ e_mail_part_animation_extract_frame (const GByteArray *anim,
/**
* e_mail_part_build_url:
* @folder: (allow-none) a #CamelFolder with the message or %NULL
- * @message_uid: (allow-none) uid of the message within the @folder or %NULL
+ * @message_uid: uid of the message within the @folder
* @first_param_name: Name of first query parameter followed by GType of it's value and value
* terminated by %NULL.
*
@@ -380,6 +380,7 @@ e_mail_part_build_uri (CamelFolder *folder,
va_list ap;
const gchar *name;
const gchar *service_uid, *folder_name;
+ gchar *encoded_message_uid;
gchar separator;
g_return_val_if_fail (message_uid && *message_uid, NULL);
@@ -397,10 +398,12 @@ e_mail_part_build_uri (CamelFolder *folder,
service_uid = "generic";
}
+ encoded_message_uid = soup_uri_encode (message_uid, NULL);
tmp = g_strdup_printf ("mail://%s/%s/%s",
service_uid,
folder_name,
- message_uid);
+ encoded_message_uid);
+ g_free (encoded_message_uid);
if (folder) {
g_free ((gchar *) folder_name);