Ensure node is an Element in DOMPurify hook
This commit is contained in:
@@ -366,6 +366,10 @@ DOMPurify.addHook('uponSanitizeElement', (node, _, config) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(node instanceof Element)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let mediaBlocked = false;
|
||||
|
||||
switch (node.tagName) {
|
||||
|
||||
Reference in New Issue
Block a user