Skip to content

Commit

Permalink
Allow iframes in the sanitizer
Browse files Browse the repository at this point in the history
  • Loading branch information
smrtrfszm committed Dec 27, 2023
1 parent a0be969 commit 8f6a0ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/PageRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const getSanitizer = (): SanizerFn => {
// TODO: fix server side html sanitization
return (x) => x
} else {
return DOMPurify.sanitize
return (dirty) => DOMPurify.sanitize(dirty, {
ADD_TAGS: ['iframe'],
})
}
}

Expand Down

0 comments on commit 8f6a0ed

Please sign in to comment.