Exclude tags in FORBID_TAGS

This commit is contained in:
G.Ambatte committed 2024-07-01 09:35:48 +12:00
1 parent fa4ced0592
commit acb10d7695
1 file changed
+1 -1
@@ -177,7 +177,7 @@ const BrewRenderer = (props)=>{
const frameDidMount = ()=>{ //This triggers when iFrame finishes internal "componentDidMount"
DOMPurify.addHook('uponSanitizeElement', (node, data, config)=>{
const tagName = node.tagName?.toLowerCase();
data.allowedTags[tagName] = true;
if(!config.FORBID_TAGS?.includes(tagName)){ data.allowedTags[tagName] = true; }
});
setTimeout(()=>{ //We still see a flicker where the style isn't applied yet, so wait 100ms before showing iFrame