Changeset c6185fa in Klonkt for src/middleware
- Timestamp:
- 07/24/2026 09:30:48 PM (7 weeks ago)
- Branches:
- main
- Children:
- c1f5c23
- Parents:
- fcd6964
- git-author:
- Robin <roboburr@…> (07/24/2026 09:30:36 PM)
- git-committer:
- Robin <roboburr@…> (07/24/2026 09:30:48 PM)
- File:
-
- 1 edited
-
src/middleware/render.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/middleware/render.js
rfcd6964 rc6185fa 27 27 // partials. HTML-escaped "<script" in rendered content (e.g. sanitized post bodies) won't 28 28 // match, so this only touches real tags. 29 function injectCspNonce(html, nonce) {29 export function injectCspNonce(html, nonce) { 30 30 if (!html || !nonce) return html; 31 31 return String(html).replace(/<script(?![^>]*\snonce=)/gi, () => `<script nonce="${nonce}"`);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)