]> granicus.if.org Git - mutt/commitdiff
don't perform rfc3676 space stuffing when recalling a postponed message where it...
authorMichael Elkins <me@sigpipe.org>
Sat, 1 Dec 2012 22:32:48 +0000 (14:32 -0800)
committerMichael Elkins <me@sigpipe.org>
Sat, 1 Dec 2012 22:32:48 +0000 (14:32 -0800)
closes #3600

send.c

diff --git a/send.c b/send.c
index 9b2fb10cca2b80c3c3e22f20cce38c9717ef365d..6326610a480dcd5389af0711004bce69f83965d0 100644 (file)
--- 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);
     }