summaryrefslogtreecommitdiffstats
path: root/mailnews
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 23:51:05 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 23:51:05 -0500
commitfa711799bfd8b2a8c745295f2d73a1c27daea302 (patch)
tree5b2ffe39736cfa798f422e3e48e62325bbf934ff /mailnews
parent38fe066bb424ab3ebf4297b9dcde12e5f8057612 (diff)
downloadUXP-fa711799bfd8b2a8c745295f2d73a1c27daea302.tar
UXP-fa711799bfd8b2a8c745295f2d73a1c27daea302.tar.gz
UXP-fa711799bfd8b2a8c745295f2d73a1c27daea302.tar.lz
UXP-fa711799bfd8b2a8c745295f2d73a1c27daea302.tar.xz
UXP-fa711799bfd8b2a8c745295f2d73a1c27daea302.zip
Bug 1525120 - Fix condition for decoding attachments (base64/qp) when saving or forwarding.
Tag #1273
Diffstat (limited to 'mailnews')
-rw-r--r--mailnews/mime/src/mimeleaf.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/mailnews/mime/src/mimeleaf.cpp b/mailnews/mime/src/mimeleaf.cpp
index 5d35ead37..b76d0ce3b 100644
--- a/mailnews/mime/src/mimeleaf.cpp
+++ b/mailnews/mime/src/mimeleaf.cpp
@@ -96,15 +96,14 @@ MimeLeaf_parse_begin (MimeObject *obj)
// don't decode text parts of message types. Other output formats,
// like "display" (nsMimeMessageBodyDisplay), need decoding.
(obj->options->format_out == nsMimeOutput::nsMimeMessageRaw &&
- obj->parent &&
+ obj->parent && obj->parent->output_p &&
(!PL_strcasecmp(obj->parent->content_type, MESSAGE_NEWS) ||
- !PL_strcasecmp(obj->parent->content_type, MESSAGE_RFC822)) &&
- !PL_strncasecmp(obj->content_type, "text/", 5)))
+ !PL_strcasecmp(obj->parent->content_type, MESSAGE_RFC822))))
/* no-op */ ;
else if (!PL_strcasecmp(obj->encoding, ENCODING_BASE64))
fn = &MimeB64DecoderInit;
else if (!PL_strcasecmp(obj->encoding, ENCODING_QUOTED_PRINTABLE))
- leaf->decoder_data =
+ leaf->decoder_data =
MimeQPDecoderInit(((MimeConverterOutputCallback)
((MimeLeafClass *)obj->clazz)->parse_decoded_buffer),
obj, obj);
@@ -153,7 +152,7 @@ MimeLeaf_parse_buffer (const char *buffer, int32_t size, MimeObject *obj)
leaf->sizeSoFar = 0;
if (leaf->decoder_data &&
- obj->options &&
+ obj->options &&
obj->options->format_out != nsMimeOutput::nsMimeMessageDecrypt
&& obj->options->format_out != nsMimeOutput::nsMimeMessageAttach) {
int outSize = 0;