@scratch/scratch-vm 11.2.0-feature-parity.2 → 11.2.0-svg-sanitization
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,7 +17,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
17
17
|
* @license MIT
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
/*! @license DOMPurify 3.2.
|
|
20
|
+
/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
|
|
21
21
|
|
|
22
22
|
/*! @source http://purl.eligrey.com/github/canvas-toBlob.js/blob/master/canvas-toBlob.js */
|
|
23
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scratch/scratch-vm",
|
|
3
|
-
"version": "11.2.0-
|
|
3
|
+
"version": "11.2.0-svg-sanitization",
|
|
4
4
|
"description": "Virtual Machine for Scratch 3.0",
|
|
5
5
|
"author": "Massachusetts Institute of Technology",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"statements": 70
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@scratch/scratch-render": "11.2.0-
|
|
54
|
-
"@scratch/scratch-svg-renderer": "11.2.0-
|
|
53
|
+
"@scratch/scratch-render": "11.2.0-svg-sanitization",
|
|
54
|
+
"@scratch/scratch-svg-renderer": "11.2.0-svg-sanitization",
|
|
55
55
|
"@vernier/godirect": "1.8.3",
|
|
56
56
|
"arraybuffer-loader": "1.0.8",
|
|
57
57
|
"atob": "2.1.2",
|
|
@@ -64,19 +64,19 @@
|
|
|
64
64
|
"immutable": "3.8.2",
|
|
65
65
|
"jszip": "3.10.1",
|
|
66
66
|
"minilog": "3.1.0",
|
|
67
|
-
"scratch-audio": "2.0.
|
|
67
|
+
"scratch-audio": "2.0.147",
|
|
68
68
|
"scratch-parser": "6.0.0",
|
|
69
|
-
"scratch-sb1-converter": "2.0.
|
|
70
|
-
"scratch-storage": "4.0.
|
|
69
|
+
"scratch-sb1-converter": "2.0.141",
|
|
70
|
+
"scratch-storage": "4.0.142",
|
|
71
71
|
"scratch-translate-extension-languages": "1.0.7",
|
|
72
72
|
"text-encoding": "0.7.0",
|
|
73
73
|
"uuid": "8.3.2",
|
|
74
74
|
"web-worker": "1.3.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@babel/core": "7.
|
|
78
|
-
"@babel/eslint-parser": "7.27.
|
|
79
|
-
"@babel/preset-env": "7.
|
|
77
|
+
"@babel/core": "7.27.1",
|
|
78
|
+
"@babel/eslint-parser": "7.27.1",
|
|
79
|
+
"@babel/preset-env": "7.27.2",
|
|
80
80
|
"adm-zip": "0.4.11",
|
|
81
81
|
"babel-loader": "9.2.1",
|
|
82
82
|
"callsite": "1.0.0",
|
|
@@ -93,15 +93,15 @@
|
|
|
93
93
|
"json": "^9.0.4",
|
|
94
94
|
"pngjs": "3.4.0",
|
|
95
95
|
"scratch-blocks": "1.1.210",
|
|
96
|
-
"scratch-l10n": "5.0.
|
|
97
|
-
"scratch-render-fonts": "1.0.
|
|
96
|
+
"scratch-l10n": "5.0.247",
|
|
97
|
+
"scratch-render-fonts": "1.0.195",
|
|
98
98
|
"scratch-semantic-release-config": "3.0.0",
|
|
99
99
|
"scratch-webpack-configuration": "3.0.0",
|
|
100
100
|
"script-loader": "0.7.2",
|
|
101
101
|
"semantic-release": "19.0.5",
|
|
102
102
|
"stats.js": "0.17.0",
|
|
103
103
|
"tap": "16.3.10",
|
|
104
|
-
"webpack": "5.
|
|
104
|
+
"webpack": "5.99.8",
|
|
105
105
|
"webpack-cli": "4.10.0",
|
|
106
106
|
"webpack-dev-server": "5.2.1"
|
|
107
107
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const JSZip = require('jszip');
|
|
2
2
|
const log = require('../util/log');
|
|
3
|
+
const {sanitizeSvg} = require('@scratch/scratch-svg-renderer');
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Deserializes sound from file into storage cache so that it can
|
|
@@ -156,6 +157,11 @@ const deserializeCostume = function (costume, runtime, zip, assetFileName, textL
|
|
|
156
157
|
|
|
157
158
|
return Promise.all([textLayerFilePromise,
|
|
158
159
|
costumeFile.async('uint8array')
|
|
160
|
+
.then(data =>
|
|
161
|
+
(costumeFormat === 'svg' ?
|
|
162
|
+
sanitizeSvg.sanitizeByteStream(data) :
|
|
163
|
+
data)
|
|
164
|
+
)
|
|
159
165
|
.then(data => storage.createAsset(
|
|
160
166
|
assetType,
|
|
161
167
|
// TODO eventually we want to map non-png's to their actual file types?
|