From af9868a7080ee0fea7355ae358c1e1766991202c Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Mon, 15 Dec 2014 16:00:25 -0200 Subject: #170 Added UTF-8 encoding to the html body, because the quoted-printable module was messing up encoding otherwise --- web-ui/app/js/helpers/view_helper.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'web-ui/app/js/helpers') diff --git a/web-ui/app/js/helpers/view_helper.js b/web-ui/app/js/helpers/view_helper.js index 841a1077..72ced4af 100644 --- a/web-ui/app/js/helpers/view_helper.js +++ b/web-ui/app/js/helpers/view_helper.js @@ -19,9 +19,10 @@ define( 'helpers/contenttype', 'lib/html_whitelister', 'views/i18n', - 'quoted-printable/quoted-printable' + 'quoted-printable/quoted-printable', + 'utf8/utf8' ], - function(contentType, htmlWhitelister, i18n_lib, quotedPrintable) { + function(contentType, htmlWhitelister, i18n_lib, quotedPrintable, utf8) { 'use strict'; function formatStatusClasses(ss) { @@ -52,7 +53,7 @@ define( var body; if (isQuotedPrintableBodyPart(bodyPart)) { - body = quotedPrintable.decode(bodyPart.body); + body = utf8.decode(quotedPrintable.decode(bodyPart.body)); } else if (bodyPart.body) { body = bodyPart.body; } else { -- cgit v1.2.3