diff --git a/src/runtime/nitro/plugins/40-cspSsrNonce.ts b/src/runtime/nitro/plugins/40-cspSsrNonce.ts index 95b75ec3..8f0cacfd 100644 --- a/src/runtime/nitro/plugins/40-cspSsrNonce.ts +++ b/src/runtime/nitro/plugins/40-cspSsrNonce.ts @@ -6,7 +6,7 @@ const LINK_RE = /]*?>)/gi const NONCE_RE = /nonce="[^"]+"/i const SCRIPT_RE = /]*?>)/gi const STYLE_RE = /]*?>)/gi -const QUOTE_MASK_RE = /"([^"]*)"/g +const QUOTE_MASK_RE = /"((?:[^"\\]|\\.)*)"/g const QUOTE_RESTORE_RE = /__QUOTE_PLACEHOLDER_(\d+)__/g function injectNonceToTags(element: string, nonce: string) {