@devvit/shared-types 0.10.15-next-2024-02-01-2a494161c.0 → 0.10.15-next-2024-02-01-f4e907745.0

Sign up to get free protection for your applications and to get access to all the features.
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-2a494161c.0",
3
+ "version": "0.10.15-next-2024-02-01-f4e907745.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-2a494161c.0"
26
+ "@devvit/protos": "0.10.15-next-2024-02-01-f4e907745.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-2a494161c.0",
31
+ "@devvit/tsconfig": "0.10.15-next-2024-02-01-f4e907745.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": "85105d507ad6a4ff89ff98be861ed46c6ae17cf7"
40
+ "gitHead": "b839195277d33f8c7cf64c4dadaeea67cc0d003a"
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizeSvg.d.ts","sourceRoot":"","sources":["../src/sanitizeSvg.ts"],"names":[],"mappings":"AA2DA;;;;;;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"}
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 = ['onload', 'onerror', 'onclick', 'onmouseover', 'href'];
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;