diff --git a/MailHog-UI/assets/js/controllers.js b/MailHog-UI/assets/js/controllers.js index 4eddc3c..09e654f 100644 --- a/MailHog-UI/assets/js/controllers.js +++ b/MailHog-UI/assets/js/controllers.js @@ -163,6 +163,21 @@ mailhogApp.controller('MailCtrl', function ($scope, $http, $sce, $timeout) { }, 10); } + $scope.tryDecodeContent = function(message, content) { + var charset = "UTF-8" + if(message.Content.Headers["Content-Type"][0]) { + // TODO + } + + if(message.Content.Headers["Content-Transfer-Encoding"][0]) { + if(message.Content.Headers["Content-Transfer-Encoding"][0] == "quoted-printable") { + content = unescapeFromQuotedPrintable(content, charset) + } + } + + return content + } + $scope.getMessagePlain = function(message) { var l = $scope.findMatchingMIME(message, "text/plain"); if(l != null && l !== "undefined") { diff --git a/MailHog-UI/assets/templates/index.html b/MailHog-UI/assets/templates/index.html index 332c3b6..bb4e820 100644 --- a/MailHog-UI/assets/templates/index.html +++ b/MailHog-UI/assets/templates/index.html @@ -228,7 +228,7 @@