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 ++++--- web-ui/app/js/main.js | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'web-ui/app/js') 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 { diff --git a/web-ui/app/js/main.js b/web-ui/app/js/main.js index f5f6bdad..6f3b3e8c 100644 --- a/web-ui/app/js/main.js +++ b/web-ui/app/js/main.js @@ -37,7 +37,8 @@ requirejs.config({ 'foundation': 'js/foundation', 'i18next': 'bower_components/i18next/i18next.amd', 'quoted-printable': 'bower_components/quoted-printable', - 'features': 'js/features/features' + 'features': 'js/features/features', + 'utf8': 'bower_components/utf8' } }); -- cgit v1.2.3