diff options
Diffstat (limited to 'web-ui/app')
-rw-r--r-- | web-ui/app/js/helpers/view_helper.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web-ui/app/js/helpers/view_helper.js b/web-ui/app/js/helpers/view_helper.js index 02067005..76e574bf 100644 --- a/web-ui/app/js/helpers/view_helper.js +++ b/web-ui/app/js/helpers/view_helper.js @@ -21,7 +21,7 @@ define( } function isQuotedPrintableBodyPart (bodyPart) { - return bodyPart.headers && + return bodyPart.headers && bodyPart.headers['Content-Transfer-Encoding'] && bodyPart.headers['Content-Transfer-Encoding'] === 'quoted-printable'; } @@ -37,8 +37,10 @@ define( if (isQuotedPrintableBodyPart(bodyPart)) { body = quotedPrintable.decode(bodyPart.body); - } else { + } else if (bodyPart.body) { body = bodyPart.body; + } else { + body = bodyPart; } return htmlWhitelister.sanitize(body, htmlWhitelister.tagPolicy); |