mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Ensure node is an Element in DOMPurify hook
This commit is contained in:
@@ -366,6 +366,10 @@ DOMPurify.addHook('uponSanitizeElement', (node, _, config) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(node instanceof Element)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let mediaBlocked = false;
|
let mediaBlocked = false;
|
||||||
|
|
||||||
switch (node.tagName) {
|
switch (node.tagName) {
|
||||||
|
Reference in New Issue
Block a user