From d654cf7b5b71b279123f3dfd162c47aab2454cc0 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Thu, 14 Nov 2024 10:32:12 +0100 Subject: chore(files): replace `@skjnldsv/sanitize-svg` with `DOMPurify` Signed-off-by: skjnldsv --- apps/files/src/models/Tab.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'apps/files/src/models') diff --git a/apps/files/src/models/Tab.js b/apps/files/src/models/Tab.js index 7b5ec721f1c..b67d51f277f 100644 --- a/apps/files/src/models/Tab.js +++ b/apps/files/src/models/Tab.js @@ -2,7 +2,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ -import { sanitizeSVG } from '@skjnldsv/sanitize-svg' +import DOMPurify from 'dompurify' export default class Tab { @@ -80,10 +80,7 @@ export default class Tab { this._scrollBottomReached = scrollBottomReached if (typeof iconSvg === 'string') { - sanitizeSVG(iconSvg) - .then(sanitizedSvg => { - this._iconSvgSanitized = sanitizedSvg - }) + this._iconSvgSanitized = DOMPurify.sanitize(iconSvg) } } -- cgit v1.2.3