Set iframe's charset to utf8

This commit is contained in:
Pēteris Caune 2021-02-26 16:36:45 +02:00
parent 46bc7d8306
commit d4fc314696
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);