mirror of
https://github.com/axllent/mailpit.git
synced 2026-06-28 06:56:06 +00:00
Chore: Simplify HTML decoding function in screenshot generation using DOMParser
This commit is contained in:
@@ -117,11 +117,7 @@ export default {
|
||||
|
||||
// HTML decode function
|
||||
decodeEntities(s) {
|
||||
const e = document.createElement("div");
|
||||
e.innerHTML = s;
|
||||
const str = e.textContent;
|
||||
e.textContent = "";
|
||||
return str;
|
||||
return new DOMParser().parseFromString(s, "text/html").body.textContent;
|
||||
},
|
||||
|
||||
doScreenshot() {
|
||||
|
||||
Reference in New Issue
Block a user