diff options
author | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-08-07 14:37:03 -0300 |
---|---|---|
committer | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-08-07 14:37:03 -0300 |
commit | 44fe6003ffdf6ab50feca5dd755d10e17b12846d (patch) | |
tree | cf4e8a8e67512dc7af1880db4c577426ead4d9a9 /web-ui/app/js | |
parent | 118e0428b906ed02f0189ffb23d7b67d1d8c4a1d (diff) |
fixes bug in which plain text emails were not being properly formatted
Diffstat (limited to 'web-ui/app/js')
-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); |