summaryrefslogtreecommitdiff
path: root/web-ui/app/js/helpers/view_helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/helpers/view_helper.js')
-rw-r--r--web-ui/app/js/helpers/view_helper.js6
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);