(body: string)
| 13 | export const DEFAULT_CSP = csp() |
| 14 | |
| 15 | export function themePreloadHash(body: string) { |
| 16 | return body.match(/<script\b(?![^>]*\bsrc\s*=)[^>]*\bid=(['"])oc-theme-preload-script\1[^>]*>([\s\S]*?)<\/script>/i) |
| 17 | } |
| 18 | |
| 19 | export function cspForHtml(body: string) { |
| 20 | const match = themePreloadHash(body) |