mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
chore(files): replace @skjnldsv/sanitize-svg with DOMPurify
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
parent
dfa7e7edea
commit
d654cf7b5b
3 changed files with 2 additions and 35 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
29
package-lock.json
generated
29
package-lock.json
generated
|
|
@ -32,7 +32,6 @@
|
|||
"@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",
|
||||
|
|
@ -4991,34 +4990,6 @@
|
|||
"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",
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@
|
|||
"@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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue