fix: Add closing quote for nonce in inline partial script (#2377)

Fixes #2376
This commit is contained in:
Adam Gregory
2024-03-21 19:32:53 +01:00
committed by GitHub
parent 8187189037
commit 9cf838684e
+1 -1
View File
@@ -169,7 +169,7 @@ export function renderFreshTags(
: null,
}),
);
const nonce = renderState.csp ? ` nonce="${renderState.getNonce()}` : "";
const nonce = renderState.csp ? ` nonce="${renderState.getNonce()}"` : "";
opts.bodyHtml +=
`<script id="__FRSH_PARTIAL_DATA_${renderState.renderUuid}" type="application/json"${nonce}>${escapedData}</script>`;
}