@adobe/helix-html-pipeline 6.14.0 → 6.14.2

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [6.14.2](https://github.com/adobe/helix-html-pipeline/compare/v6.14.1...v6.14.2) (2024-08-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency hast-util-to-html to v9.0.2 ([485dedc](https://github.com/adobe/helix-html-pipeline/commit/485dedc99cc8136a186043e54ab7a0466f9a81b5))
7
+
8
+ ## [6.14.1](https://github.com/adobe/helix-html-pipeline/compare/v6.14.0...v6.14.1) (2024-08-12)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * escape HTML characters in JSON LD ([8595baa](https://github.com/adobe/helix-html-pipeline/commit/8595baa751433be0e9194110890a7bdb689a710c))
14
+
1
15
  # [6.14.0](https://github.com/adobe/helix-html-pipeline/compare/v6.13.0...v6.14.0) (2024-08-01)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.14.0",
3
+ "version": "6.14.2",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "lint": "eslint .",
18
18
  "semantic-release": "semantic-release",
19
19
  "semantic-release-dry": "semantic-release --dry-run --branches $CI_BRANCH",
20
- "prepare": "husky install"
20
+ "prepare": "husky"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
@@ -50,7 +50,7 @@
50
50
  "github-slugger": "2.0.0",
51
51
  "hast-util-raw": "9.0.4",
52
52
  "hast-util-select": "6.0.2",
53
- "hast-util-to-html": "9.0.1",
53
+ "hast-util-to-html": "9.0.2",
54
54
  "hast-util-to-string": "3.0.0",
55
55
  "hastscript": "9.0.0",
56
56
  "lodash.escape": "4.0.1",
@@ -81,15 +81,15 @@
81
81
  "eslint-plugin-header": "3.1.1",
82
82
  "eslint-plugin-import": "2.29.1",
83
83
  "esmock": "2.6.7",
84
- "husky": "9.1.3",
84
+ "husky": "9.1.5",
85
85
  "js-yaml": "4.1.0",
86
- "jsdom": "24.1.1",
87
- "junit-report-builder": "4.0.0",
88
- "lint-staged": "15.2.7",
89
- "mocha": "10.7.0",
86
+ "jsdom": "25.0.0",
87
+ "junit-report-builder": "5.0.0",
88
+ "lint-staged": "15.2.9",
89
+ "mocha": "10.7.3",
90
90
  "mocha-multi-reporters": "1.5.1",
91
91
  "mocha-suppress-logs": "0.5.1",
92
- "semantic-release": "24.0.0"
92
+ "semantic-release": "24.1.0"
93
93
  },
94
94
  "lint-staged": {
95
95
  "*.js": "eslint",
@@ -36,10 +36,8 @@ function createElement(name, ...attrs) {
36
36
  }
37
37
 
38
38
  function sanitizeJsonLd(jsonLd) {
39
- if (jsonLd.toLowerCase().indexOf('</script>') >= 0) {
40
- throw new Error('script tag not allowed');
41
- }
42
- return JSON.stringify(JSON.parse(jsonLd.trim()));
39
+ const sanitizedJsonLd = jsonLd.replaceAll('<', '&#x3c;').replaceAll('>', '&#x3e;');
40
+ return JSON.stringify(JSON.parse(sanitizedJsonLd.trim()));
43
41
  }
44
42
 
45
43
  /**