Skip to content

Commit ccb27d0

Browse files
committed
fix nonce scripts
1 parent b1b6ec6 commit ccb27d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/Pages/_Host.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
// The nonce is passed to the client through the HTML to avoid sync issues between tabs
2727
source = source.Replace("**PLACEHOLDER_NONCE_SERVER**", nonce);
2828

29-
var nonceScript = $"<script nonce={nonce} type=";
29+
var nonceScript = $"<script nonce=\"{nonce}\" type=";
3030
source = source.Replace("<script type=", nonceScript);
3131

3232
// link rel="stylesheet"
33-
var nonceLinkStyle = $"<link nonce={nonce} rel=\"stylesheet";
33+
var nonceLinkStyle = $"<link nonce=\"{nonce}\" rel=\"stylesheet";
3434
source = source.Replace("<link rel=\"stylesheet", nonceLinkStyle);
3535

3636
var xsrf = antiForgery.GetAndStoreTokens(HttpContext);

0 commit comments

Comments
 (0)