diff --git a/gitnexus/src/core/wiki/html-viewer.ts b/gitnexus/src/core/wiki/html-viewer.ts index b8b9bb01e..a21b424dd 100644 --- a/gitnexus/src/core/wiki/html-viewer.ts +++ b/gitnexus/src/core/wiki/html-viewer.ts @@ -5,6 +5,7 @@ * module tree, and metadata — viewable offline in any browser. */ +import { randomBytes } from 'crypto'; import fs from 'fs/promises'; import path from 'path'; @@ -90,6 +91,8 @@ function buildHTML( const treeJSON = safeJSON(moduleTree); const metaJSON = safeJSON(meta); + const nonce = randomBytes(16).toString('base64'); + const parts: string[] = []; // ── Head ── @@ -98,11 +101,11 @@ function buildHTML( parts.push(''); parts.push(''); parts.push(''); - parts.push(''); + parts.push(``); parts.push('' + esc(projectName) + ' — Wiki'); - parts.push('