Browse Source

Set iframe's charset to utf8

pull/485/head
Pēteris Caune 4 years ago
parent
commit
d4fc314696
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      static/js/details.js
  2. +1
    -1
      static/js/log.js

+ 1
- 1
static/js/details.js View File

@ -137,7 +137,7 @@ $(function () {
if (htmlPre.length) { if (htmlPre.length) {
var opts = {USE_PROFILES: {html: true}}; var opts = {USE_PROFILES: {html: true}};
var clean = DOMPurify.sanitize(htmlPre.text(), opts); 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(); htmlPre.remove();
document.getElementById("email-body-html-iframe").src = URL.createObjectURL(blob); document.getElementById("email-body-html-iframe").src = URL.createObjectURL(blob);


+ 1
- 1
static/js/log.js View File

@ -10,7 +10,7 @@ $(function () {
if (htmlPre.length) { if (htmlPre.length) {
var opts = {USE_PROFILES: {html: true}}; var opts = {USE_PROFILES: {html: true}};
var clean = DOMPurify.sanitize(htmlPre.text(), opts); 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(); htmlPre.remove();
document.getElementById("email-body-html-iframe").src = URL.createObjectURL(blob); document.getElementById("email-body-html-iframe").src = URL.createObjectURL(blob);


Loading…
Cancel
Save