From 094e4845d1a3efd02965d6a07c517cca5b733fed Mon Sep 17 00:00:00 2001 From: Lars Date: Mon, 23 Dec 2024 12:19:40 +0100 Subject: [PATCH] fix(deps): use `isomorphic-dompurify` --- apps/web/package.json | 1 - packages/editor/package.json | 1 - packages/editor/src/plugins/edusharing-asset/renderer.tsx | 2 +- .../editor/src/plugins/text/static-components/static-math.tsx | 2 +- yarn.lock | 2 -- 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index af2292215a..778d993c4e 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -52,7 +52,6 @@ "autoprefixer": "^10.4.20", "canvas-confetti": "^1.9.3", "clsx": "^2.1.1", - "dompurify": "^3.2.3", "fast-xml-parser": "^4.5.0", "fp-ts": "^2.16.9", "graphiql": "^3.7.2", diff --git a/packages/editor/package.json b/packages/editor/package.json index 8b054c4d38..a77ea331a6 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -50,7 +50,6 @@ "@open-iframe-resizer/react": "1.2.1", "@serlo/katex-styles": "1.0.1", "@vidstack/react": "next", - "dompurify": "^3.2.3", "isomorphic-dompurify": "^2.19.0", "lit": "^3.2.1", "motion": "^11.11.17", diff --git a/packages/editor/src/plugins/edusharing-asset/renderer.tsx b/packages/editor/src/plugins/edusharing-asset/renderer.tsx index 2d9a819cd2..34a1e165a2 100644 --- a/packages/editor/src/plugins/edusharing-asset/renderer.tsx +++ b/packages/editor/src/plugins/edusharing-asset/renderer.tsx @@ -1,7 +1,7 @@ import EdusharingIcon from '@editor/editor-ui/assets/edusharing.svg' import { IframeResizer } from '@open-iframe-resizer/react' -import DOMPurify from 'dompurify' import * as t from 'io-ts' +import DOMPurify from 'isomorphic-dompurify' import { memo, useEffect, useState } from 'react' type EmbedType = diff --git a/packages/editor/src/plugins/text/static-components/static-math.tsx b/packages/editor/src/plugins/text/static-components/static-math.tsx index e5d3070ef8..1697df1439 100644 --- a/packages/editor/src/plugins/text/static-components/static-math.tsx +++ b/packages/editor/src/plugins/text/static-components/static-math.tsx @@ -1,6 +1,6 @@ import { sanitizeLatex } from '@editor/plugins/text/utils/sanitize-latex' import { cn } from '@editor/utils/cn' -import DOMPurify from 'dompurify' +import DOMPurify from 'isomorphic-dompurify' import KaTeX from 'katex' // eslint-disable-next-line import/no-unassigned-import import 'katex/contrib/mhchem' diff --git a/yarn.lock b/yarn.lock index 1d00d5f534..7712aab187 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5798,7 +5798,6 @@ __metadata: "@vitejs/plugin-react": ^4.3.3 autoprefixer: ^10.4.20 clsx: ^2.1.1 - dompurify: ^3.2.3 eslint: ^9.14.0 eslint-config-next: ^15.0.3 eslint-config-prettier: ^9.1.0 @@ -5925,7 +5924,6 @@ __metadata: canvas-confetti: ^1.9.3 clsx: ^2.1.1 cross-env: ^7.0.3 - dompurify: ^3.2.3 dotenv: ^16.4.5 eslint: ^9.14.0 eslint-config-next: ^15.0.3