From: Kevin McCarthy Date: Thu, 20 Dec 2018 01:43:26 +0000 (-0800) Subject: When postponing, encode descriptions before encrypting X-Git-Tag: 2019-10-25~396^2~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3d5bcf8bd0e9df4ea353c4424a4c897137a6891;p=neomutt When postponing, encode descriptions before encrypting This matches the behavior of the normal send process. I don't think there is actually an issue here since nothing is sent, but it makes sense to be consistent. Co-authored-by: Richard Russon --- diff --git a/send.c b/send.c index abea1323b..0f978d039 100644 --- a/send.c +++ b/send.c @@ -1652,10 +1652,11 @@ static int postpone_message(struct Email *msg, struct Email *cur, char *fcc, int if (!Postponed) return -1; - /* postpone the message until later. */ if (msg->content->next) msg->content = mutt_make_multipart(msg->content); + mutt_encode_descriptions(msg->content, true); + if ((WithCrypto != 0) && PostponeEncrypt && (msg->security & ENCRYPT)) { if (((WithCrypto & APPLICATION_PGP) != 0) && (msg->security & APPLICATION_PGP)) @@ -1678,12 +1679,15 @@ static int postpone_message(struct Email *msg, struct Email *cur, char *fcc, int msg->security |= SIGN; FREE(&pgpkeylist); msg->content = mutt_remove_multipart(msg->content); + decode_descriptions(msg->content); return -1; } if (is_signed) msg->security |= SIGN; FREE(&pgpkeylist); + + mutt_encode_descriptions(msg->content, false); } } @@ -1693,7 +1697,6 @@ static int postpone_message(struct Email *msg, struct Email *cur, char *fcc, int msg->read = false; msg->old = false; - mutt_encode_descriptions(msg->content, true); mutt_prepare_envelope(msg->env, false); mutt_env_to_intl(msg->env, NULL, NULL); /* Handle bad IDNAs the next time. */