From 8f6a0ed533e3f49a7d91f55598b19f68842a47d6 Mon Sep 17 00:00:00 2001 From: Szepesi Tibor Date: Wed, 27 Dec 2023 16:15:48 +0100 Subject: [PATCH] Allow iframes in the sanitizer --- src/components/PageRenderer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/PageRenderer.tsx b/src/components/PageRenderer.tsx index df94cde..2e01374 100644 --- a/src/components/PageRenderer.tsx +++ b/src/components/PageRenderer.tsx @@ -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'], + }) } }