summaryrefslogtreecommitdiff
path: root/web-ui
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui')
-rw-r--r--web-ui/app/js/helpers/view_helper.js7
-rw-r--r--web-ui/app/js/main.js3
-rw-r--r--web-ui/bower.json3
-rw-r--r--web-ui/config/package.sh1
-rw-r--r--web-ui/karma.conf.js1
-rw-r--r--web-ui/test/test-main.js1
6 files changed, 11 insertions, 5 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'
}
});
diff --git a/web-ui/bower.json b/web-ui/bower.json
index 8998930e..3b51fefa 100644
--- a/web-ui/bower.json
+++ b/web-ui/bower.json
@@ -11,7 +11,8 @@
"font-awesome": "4.2.0",
"quoted-printable": "0.2.1",
"typeahead.js": "~0.10.5",
- "jasmine-flight": "~3.0.0"
+ "jasmine-flight": "~3.0.0",
+ "utf8": "~2.0.0"
},
"devDependencies": {
"handlebars": "2.0.0",
diff --git a/web-ui/config/package.sh b/web-ui/config/package.sh
index 66509038..18a9148a 100644
--- a/web-ui/config/package.sh
+++ b/web-ui/config/package.sh
@@ -38,6 +38,7 @@ cat \
app/bower_components/modernizr/modernizr.js \
app/bower_components/lodash/dist/lodash.js \
app/bower_components/jquery/dist/jquery.js \
+app/bower_components/utf8/utf8.js
app/js/lib/highlightRegex.js \
app/bower_components/handlebars/handlebars.min.js \
app/bower_components/typeahead.js/dist/typeahead.bundle.min.js \
diff --git a/web-ui/karma.conf.js b/web-ui/karma.conf.js
index 1d751b9f..7b1d699c 100644
--- a/web-ui/karma.conf.js
+++ b/web-ui/karma.conf.js
@@ -38,6 +38,7 @@ module.exports = function (config) {
{pattern: 'app/bower_components/flight/**/*.js', included: false},
{pattern: 'app/bower_components/i18next/**/*.js', included: false},
{pattern: 'app/bower_components/quoted-printable/*.js', included: false},
+ {pattern: 'app/bower_components/utf8/utf8.js', included: false},
{pattern: 'app/locales/**/*.json', included: false},
{pattern: 'app/js/**/*.js', included: false},
{pattern: 'test/test_data.js', included: false},
diff --git a/web-ui/test/test-main.js b/web-ui/test/test-main.js
index 5d5c7391..9cd5b12a 100644
--- a/web-ui/test/test-main.js
+++ b/web-ui/test/test-main.js
@@ -28,6 +28,7 @@ requirejs.config({
'monkey_patching': 'app/js/monkey_patching',
'i18next': 'app/bower_components/i18next/i18next.amd',
'quoted-printable': 'app/bower_components/quoted-printable',
+ 'utf8': 'app/bower_components/utf8',
'test': 'test',
'features': 'test/features'
},