mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-09 09:22:38 +00:00
Shift to element.remove()
This commit is contained in:
@@ -27,7 +27,7 @@ function safeHTML(htmlString) {
|
|||||||
elements.forEach((element)=>{
|
elements.forEach((element)=>{
|
||||||
// Check each element for blacklisted type
|
// Check each element for blacklisted type
|
||||||
if(blacklistTags.includes(element?.localName?.toLowerCase())) {
|
if(blacklistTags.includes(element?.localName?.toLowerCase())) {
|
||||||
element.parentNode.removeChild(element);
|
element.remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Check remaining elements for blacklisted attributes
|
// Check remaining elements for blacklisted attributes
|
||||||
|
|||||||
Reference in New Issue
Block a user