mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 13:52:38 +00:00
Exclude tags in FORBID_TAGS
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user