* 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 {
this._scrollBottomReached = scrollBottomReached
if (typeof iconSvg === 'string') {
- sanitizeSVG(iconSvg)
- .then(sanitizedSvg => {
- this._iconSvgSanitized = sanitizedSvg
- })
+ this._iconSvgSanitized = DOMPurify.sanitize(iconSvg)
}
}
"@nextcloud/upload": "^1.7.0",
"@nextcloud/vue": "^8.17.1",
"@simplewebauthn/browser": "^10.0.0",
- "@skjnldsv/sanitize-svg": "^1.0.2",
"@vueuse/components": "^11.1.0",
"@vueuse/core": "^11.0.1",
"@vueuse/integrations": "^11.1.0",
"dev": true,
"license": "(Unlicense OR Apache-2.0)"
},
- "node_modules/@skjnldsv/sanitize-svg": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@skjnldsv/sanitize-svg/-/sanitize-svg-1.0.2.tgz",
- "integrity": "sha512-blfdQZ9jr4K9IOhifF0FVhKf9LCFH0L8wWR/vEgdA53q8DGNEbjUGMNo4VU1QugglaoQdFy65O2abODRFflsSg==",
- "license": "MIT",
- "dependencies": {
- "is-svg": "^4.3.2"
- },
- "engines": {
- "node": "^14.0.0",
- "npm": "^7.0.0"
- }
- },
- "node_modules/@skjnldsv/sanitize-svg/node_modules/is-svg": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.4.0.tgz",
- "integrity": "sha512-v+AgVwiK5DsGtT9ng+m4mClp6zDAmwrW8nZi6Gg15qzvBnRWWdfWA1TGaXyCDnWq5g5asofIgMVl3PjKxvk1ug==",
- "license": "MIT",
- "dependencies": {
- "fast-xml-parser": "^4.1.3"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/@socket.io/component-emitter": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
"@nextcloud/upload": "^1.7.0",
"@nextcloud/vue": "^8.17.1",
"@simplewebauthn/browser": "^10.0.0",
- "@skjnldsv/sanitize-svg": "^1.0.2",
"@vueuse/components": "^11.1.0",
"@vueuse/core": "^11.0.1",
"@vueuse/integrations": "^11.1.0",