@devvit/shared-types 0.10.15-next-2024-02-01-c41b52425.0 → 0.10.15-next-2024-02-01-199572fcc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +4 -4
- package/sanitizeSvg.d.ts.map +1 -1
- package/sanitizeSvg.js +11 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devvit/shared-types",
|
3
|
-
"version": "0.10.15-next-2024-02-01-
|
3
|
+
"version": "0.10.15-next-2024-02-01-199572fcc.0",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -23,12 +23,12 @@
|
|
23
23
|
},
|
24
24
|
"types": "./index.d.ts",
|
25
25
|
"dependencies": {
|
26
|
-
"@devvit/protos": "0.10.15-next-2024-02-01-
|
26
|
+
"@devvit/protos": "0.10.15-next-2024-02-01-199572fcc.0"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@devvit/eslint-config": "0.10.14",
|
30
30
|
"@devvit/repo-tools": "0.10.14",
|
31
|
-
"@devvit/tsconfig": "0.10.15-next-2024-02-01-
|
31
|
+
"@devvit/tsconfig": "0.10.15-next-2024-02-01-199572fcc.0",
|
32
32
|
"eslint": "8.9.0",
|
33
33
|
"typescript": "5.3.2",
|
34
34
|
"vitest": "0.31.0"
|
@@ -37,5 +37,5 @@
|
|
37
37
|
"directory": "dist"
|
38
38
|
},
|
39
39
|
"source": "./src/index.ts",
|
40
|
-
"gitHead": "
|
40
|
+
"gitHead": "9111e82355ae1c515b25fccfdf4eb72b7126dc35"
|
41
41
|
}
|
package/sanitizeSvg.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sanitizeSvg.d.ts","sourceRoot":"","sources":["../src/sanitizeSvg.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"sanitizeSvg.d.ts","sourceRoot":"","sources":["../src/sanitizeSvg.ts"],"names":[],"mappings":"AAqEA;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;AACjD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC"}
|
package/sanitizeSvg.js
CHANGED
@@ -45,7 +45,17 @@ const DISALLOWED_STYLES = [
|
|
45
45
|
'cursor',
|
46
46
|
'content',
|
47
47
|
];
|
48
|
-
const DISALLOWED_ATTRIBUTES = [
|
48
|
+
const DISALLOWED_ATTRIBUTES = [
|
49
|
+
'onload',
|
50
|
+
'onerror',
|
51
|
+
'onclick',
|
52
|
+
'onmouseover',
|
53
|
+
/**
|
54
|
+
* 1/31/24: We need to allow images so we can make things happen.
|
55
|
+
* https://reddit.atlassian.net/browse/DX-5740
|
56
|
+
*/
|
57
|
+
// 'href',
|
58
|
+
];
|
49
59
|
function ensureXmlns(svg) {
|
50
60
|
if (/xmlns=["']http:\/\/www\.w3\.org\/2000\/svg["']/.test(svg)) {
|
51
61
|
return svg;
|