mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 03:32:40 +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"
|
const frameDidMount = ()=>{ //This triggers when iFrame finishes internal "componentDidMount"
|
||||||
DOMPurify.addHook('uponSanitizeElement', (node, data, config)=>{
|
DOMPurify.addHook('uponSanitizeElement', (node, data, config)=>{
|
||||||
const tagName = node.tagName?.toLowerCase();
|
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
|
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