summaryrefslogtreecommitdiff
path: root/web-ui/app
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2014-12-15 16:00:25 -0200
committerBruno Wagner <bwgpro@gmail.com>2014-12-15 16:00:25 -0200
commitaf9868a7080ee0fea7355ae358c1e1766991202c (patch)
tree4ee1cad69b10f119d17125a9cf8dec49f6b67fd6 /web-ui/app
parentc5e45b28aa99d926ed6f53b8155da56dfb366941 (diff)
#170 Added UTF-8 encoding to the html body, because the quoted-printable module was messing up encoding otherwise
Diffstat (limited to 'web-ui/app')
-rw-r--r--web-ui/app/js/helpers/view_helper.js7
-rw-r--r--web-ui/app/js/main.js3
2 files changed, 6 insertions, 4 deletions
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'
}
});