@adobe/helix-html-pipeline 6.33.14 → 6.33.16

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.33.16](https://github.com/adobe/helix-html-pipeline/compare/v6.33.15...v6.33.16) (2026-12-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency mdast-util-to-hast to v13.2.2 ([#1176](https://github.com/adobe/helix-html-pipeline/issues/1176)) ([b7ff06e](https://github.com/adobe/helix-html-pipeline/commit/b7ff06e3f618eea1c3e26cb91707d96c5a4d677c))
7
+
8
+ ## [6.33.15](https://github.com/adobe/helix-html-pipeline/compare/v6.33.14...v6.33.15) (2026-11-30)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * apply csp to the .plain.html rendering ([#1171](https://github.com/adobe/helix-html-pipeline/issues/1171)) ([e7a2636](https://github.com/adobe/helix-html-pipeline/commit/e7a2636bc7975c8a61932790377d718348ef834f))
14
+
1
15
  ## [6.33.14](https://github.com/adobe/helix-html-pipeline/compare/v6.33.13...v6.33.14) (2026-11-29)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.33.14",
3
+ "version": "6.33.16",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -53,7 +53,7 @@
53
53
  "hast-util-to-string": "3.0.1",
54
54
  "hastscript": "9.0.3",
55
55
  "lodash.escape": "4.0.1",
56
- "mdast-util-to-hast": "13.2.1",
56
+ "mdast-util-to-hast": "13.2.2",
57
57
  "mdast-util-to-string": "4.0.0",
58
58
  "mime": "4.1.2",
59
59
  "parse5": "8.1.1",
@@ -84,9 +84,9 @@
84
84
  "esmock": "3.0.0",
85
85
  "husky": "9.1.7",
86
86
  "js-yaml": "5.5.0",
87
- "jsdom": "31.0.0",
87
+ "jsdom": "31.0.1",
88
88
  "junit-report-builder": "5.1.2",
89
- "lint-staged": "17.6.0",
89
+ "lint-staged": "17.6.1",
90
90
  "mocha": "12.0.3",
91
91
  "mocha-multi-reporters": "1.5.2",
92
92
  "mocha-suppress-logs": "0.6.0",
@@ -15,7 +15,7 @@ import { h } from 'hastscript';
15
15
  import { unified } from 'unified';
16
16
  import rehypeParse from 'rehype-parse';
17
17
  import { cleanupHeaderValue } from '@adobe/helix-shared-utils';
18
- import { contentSecurityPolicyOnAST } from './csp.js';
18
+ import { contentSecurityPolicyOnAST, NONCE_AEM } from './csp.js';
19
19
 
20
20
  function appendElement($parent, $el) {
21
21
  if ($el) {
@@ -54,6 +54,15 @@ export default async function render(state, req, res) {
54
54
  const { hast, meta } = content;
55
55
 
56
56
  if (state.info.selector === 'plain') {
57
+ // plain responses have no <head>, but the CSP headers still need to be applied.
58
+ // head.html is only relevant if it contains a meta CSP with nonce that can be moved to a header
59
+ let plainHead = { type: 'root', children: [] };
60
+ const plainHeadHtml = state.config?.head?.html;
61
+ if (plainHeadHtml?.includes(NONCE_AEM)) {
62
+ plainHead = unified().use(rehypeParse, { fragment: true }).parse(plainHeadHtml);
63
+ }
64
+ contentSecurityPolicyOnAST(res, plainHead);
65
+
57
66
  // just return body
58
67
  res.document = hast;
59
68
  return;