0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

Shift to element.remove()

This commit is contained in:
G.Ambatte
2024-10-29 16:50:44 +13:00
parent 3f8ec30f89
commit 9edf65c252

View File

@@ -27,7 +27,7 @@ function safeHTML(htmlString) {
elements.forEach((element)=>{
// Check each element for blacklisted type
if(blacklistTags.includes(element?.localName?.toLowerCase())) {
element.parentNode.removeChild(element);
element.remove();
return;
}
// Check remaining elements for blacklisted attributes