Chore: Simplify HTML decoding function in screenshot generation using DOMParser

This commit is contained in:
Ralph Slooten
2026-03-10 10:04:47 +13:00
parent b99be839a0
commit bc8a737d4f

View File

@@ -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() {