add support for embed, media elements

This commit is contained in:
2023-07-16 16:20:32 -07:00
parent ea133cb0a7
commit 43e15a90a9
3 changed files with 36 additions and 0 deletions

View File

@@ -9,5 +9,6 @@ export function sanitize_html(html: string, custom_elements?: CustomElementHandl
const dom_purify = createDOMPurify(window as any as Window);
return dom_purify.sanitize(html, {
CUSTOM_ELEMENT_HANDLING: custom_elements,
ADD_TAGS: [ 'embed', 'object', 'video', 'audio', 'iframe' ],
});
}