From 4082800dedad0a9e4dbdd09b807f4cb0d7641994 Mon Sep 17 00:00:00 2001 From: Lars Date: Wed, 23 Oct 2024 12:36:58 +0200 Subject: [PATCH] fix(edusharing-plugin): use correct import --- packages/editor/src/plugins/edusharing-asset/renderer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/plugins/edusharing-asset/renderer.tsx b/packages/editor/src/plugins/edusharing-asset/renderer.tsx index eb001b8f18..407b02d7d7 100644 --- a/packages/editor/src/plugins/edusharing-asset/renderer.tsx +++ b/packages/editor/src/plugins/edusharing-asset/renderer.tsx @@ -1,5 +1,5 @@ import EdusharingIcon from '@editor/editor-ui/assets/edusharing.svg' -import { sanitize } from 'dompurify' +import DOMPurify from 'dompurify' import IframeResizer from 'iframe-resizer-react' import * as t from 'io-ts' import { memo, useEffect, useState } from 'react' @@ -81,7 +81,7 @@ export function EdusharingAssetRenderer(props: { getEmbedHtml(responseJson) // Prevent common XSS methods - const sanitizedHtml = sanitize(html) + const sanitizedHtml = DOMPurify.sanitize(html) setEmbedType(embedType) setEmbedHtml(sanitizedHtml)