]> granicus.if.org Git - neomutt/commitdiff
Check noconv for mailcap %{charset} send mode expansion
authorKevin McCarthy <kevin@8t8.us>
Fri, 8 Mar 2019 11:48:41 +0000 (19:48 +0800)
committerRichard Russon <rich@flatcap.org>
Tue, 9 Apr 2019 11:54:27 +0000 (12:54 +0100)
Improve the previous commit by checking to make sure a->noconv also
isn't set.  If noconv is set, we ignore any value a->charset might
have picked up during previous encoding checks.

Co-authored-by: Richard Russon <rich@flatcap.org>
rfc1524.c

index 0fd284951f52e2bd1ef8a24a26f23f3a8d751ac3..2e3c082af4a32cc8b4fa41ea4d7b59ef6e744100 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -106,7 +106,7 @@ int rfc1524_expand_command(struct Body *a, const char *filename,
 
         /* In send mode, use the current charset, since the message hasn't
          * been converted yet. */
-        if ((mutt_str_strcasecmp(param, "charset") == 0) && a->charset)
+        if ((mutt_str_strcasecmp(param, "charset") == 0) && a->charset && !a->noconv)
           pvalue2 = a->charset;
         else
           pvalue2 = mutt_param_get(&a->parameter, param);