From d4fc314696606e384eecd5ae8dc92ff249ee9ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 26 Feb 2021 16:36:45 +0200 Subject: [PATCH] Set iframe's charset to utf8 --- static/js/details.js | 2 +- static/js/log.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/details.js b/static/js/details.js index cafaa6cf..1404091c 100644 --- a/static/js/details.js +++ b/static/js/details.js @@ -137,7 +137,7 @@ $(function () { if (htmlPre.length) { var opts = {USE_PROFILES: {html: true}}; var clean = DOMPurify.sanitize(htmlPre.text(), opts); - var blob = new Blob([clean], {type: "text/html"}); + var blob = new Blob([clean], {type: "text/html; charset=utf-8"}); htmlPre.remove(); document.getElementById("email-body-html-iframe").src = URL.createObjectURL(blob); diff --git a/static/js/log.js b/static/js/log.js index 3b65cd50..1c34d21f 100644 --- a/static/js/log.js +++ b/static/js/log.js @@ -10,7 +10,7 @@ $(function () { if (htmlPre.length) { var opts = {USE_PROFILES: {html: true}}; var clean = DOMPurify.sanitize(htmlPre.text(), opts); - var blob = new Blob([clean], {type: "text/html"}); + var blob = new Blob([clean], {type: "text/html; charset=utf-8"}); htmlPre.remove(); document.getElementById("email-body-html-iframe").src = URL.createObjectURL(blob);