@adobe/helix-html-pipeline 6.33.13 → 6.33.15

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.15](https://github.com/adobe/helix-html-pipeline/compare/v6.33.14...v6.33.15) (2026-11-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 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))
7
+
8
+ ## [6.33.14](https://github.com/adobe/helix-html-pipeline/compare/v6.33.13...v6.33.14) (2026-11-29)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update dependency @adobe/mdast-util-gridtables to v4.0.26 ([#1174](https://github.com/adobe/helix-html-pipeline/issues/1174)) ([63e6a00](https://github.com/adobe/helix-html-pipeline/commit/63e6a00d4a80417d5357dbff9ac1691a7cb12bfb))
14
+
1
15
  ## [6.33.13](https://github.com/adobe/helix-html-pipeline/compare/v6.33.12...v6.33.13) (2026-11-26)
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.13",
3
+ "version": "6.33.15",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@adobe/helix-markdown-support": "7.1.31",
46
46
  "@adobe/helix-shared-utils": "3.0.2",
47
- "@adobe/mdast-util-gridtables": "4.0.25",
47
+ "@adobe/mdast-util-gridtables": "4.0.26",
48
48
  "@adobe/remark-gridtables": "3.0.23",
49
49
  "github-slugger": "2.0.0",
50
50
  "hast-util-raw": "9.2.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;