From 19b6f1bb463c4a50726a0d54d690822948b8fceb Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Sat, 1 Dec 2012 14:32:48 -0800 Subject: [PATCH] don't perform rfc3676 space stuffing when recalling a postponed message where it has already been done. closes #3600 --- send.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/send.c b/send.c index 9b2fb10cc..6326610a4 100644 --- a/send.c +++ b/send.c @@ -1408,8 +1408,17 @@ ci_send_message (int flags, /* send mode */ mutt_perror (msg->content->filename); } - if (option (OPTTEXTFLOWED)) - rfc3676_space_stuff (msg); + /* If using format=flowed, perform space stuffing. Avoid stuffing when + * recalling a postponed message where the stuffing was already + * performed. If it has already been performed, the format=flowed + * parameter will be present. + */ + if (option (OPTTEXTFLOWED) && msg->content->type == TYPETEXT && !ascii_strcasecmp("plain", msg->content->subtype)) + { + char *p = mutt_get_parameter("format", msg->content->parameter); + if (ascii_strcasecmp("flowed", NONULL(p))) + rfc3676_space_stuff (msg); + } mutt_message_hook (NULL, msg, M_SEND2HOOK); } -- 2.40.0