Skip to content

Commit d654cf7

Browse files
committed
chore(files): replace @skjnldsv/sanitize-svg with DOMPurify
Signed-off-by: skjnldsv <[email protected]>
1 parent dfa7e7e commit d654cf7

File tree

3 files changed

+2
-35
lines changed

3 files changed

+2
-35
lines changed

apps/files/src/models/Tab.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5-
import { sanitizeSVG } from '@skjnldsv/sanitize-svg'
5+
import DOMPurify from 'dompurify'
66

77
export default class Tab {
88

@@ -80,10 +80,7 @@ export default class Tab {
8080
this._scrollBottomReached = scrollBottomReached
8181

8282
if (typeof iconSvg === 'string') {
83-
sanitizeSVG(iconSvg)
84-
.then(sanitizedSvg => {
85-
this._iconSvgSanitized = sanitizedSvg
86-
})
83+
this._iconSvgSanitized = DOMPurify.sanitize(iconSvg)
8784
}
8885

8986
}

package-lock.json

Lines changed: 0 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
"@nextcloud/upload": "^1.7.0",
6464
"@nextcloud/vue": "^8.17.1",
6565
"@simplewebauthn/browser": "^10.0.0",
66-
"@skjnldsv/sanitize-svg": "^1.0.2",
6766
"@vueuse/components": "^11.1.0",
6867
"@vueuse/core": "^11.0.1",
6968
"@vueuse/integrations": "^11.1.0",

0 commit comments

Comments
 (0)