]> source.dussan.org Git - nextcloud-server.git/commitdiff
chore(files): replace `@skjnldsv/sanitize-svg` with `DOMPurify` chore/drop-skjnldsv/sanitize-svg
authorskjnldsv <skjnldsv@protonmail.com>
Thu, 14 Nov 2024 09:32:12 +0000 (10:32 +0100)
committerskjnldsv <skjnldsv@protonmail.com>
Thu, 14 Nov 2024 09:32:12 +0000 (10:32 +0100)
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
apps/files/src/models/Tab.js
package-lock.json
package.json

index 7b5ec721f1c5c492a72c4d6003d16d089aca6ad2..b67d51f277fc643af32b3185da354956ca733690 100644 (file)
@@ -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)
                }
 
        }
index 3d1cdca9f3437ee5e8b7ab53d4a23da317855b0a..4364f51d590e58d84950d0d192c27ff365465cbc 100644 (file)
@@ -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",
       "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",
index 0678817e178848dd750509e96560a896f82011cb..b5fdcad96ce94438c4df2d405d45036475d91a97 100644 (file)
@@ -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",