Skip to content

Commit

Permalink
[release/8.0] Update SDK (#51059)
Browse files Browse the repository at this point in the history
* Update global.json

* Fix regression in inline script in .razor

* Build fix

* Update SDK more

* Work around dotnet tool restore issue

* Fix message

* Update Tools.props

* Update .gitignore

* Try hard-coding

* Update helix.proj

* Update helix.proj

* Update .js

* Diag

* Revert "Diag"

This reverts commit 33ca76f.

* Revert "Update helix.proj"

This reverts commit 93c33f0.

* Revert "Update helix.proj"

This reverts commit abaa4f1.

* Revert "Try hard-coding"

This reverts commit f0fb388.

* Revert "Update .gitignore"

This reverts commit ecfa362.

* Revert "Update Tools.props"

This reverts commit 89fda27.

* Revert "Fix message"

This reverts commit 5808bf1.

* Revert "Work around dotnet tool restore issue"

This reverts commit c9af2e8.

* Update SDK

---------

Co-authored-by: wtgodbe <wigodbe@microsoft.com>
  • Loading branch information
SteveSandersonMS and wtgodbe authored Oct 6, 2023
1 parent a8087dc commit 6bd3734
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "8.0.100-rc.2.23422.11"
"version": "8.0.100-rtm.23506.1"
},
"tools": {
"dotnet": "8.0.100-rc.2.23422.11",
"dotnet": "8.0.100-rtm.23506.1",
"runtimes": {
"dotnet/x86": [
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Web.JS/dist/Release/blazor.server.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Components/Web.JS/dist/Release/blazor.web.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Components/Web.JS/dist/Release/blazor.webview.js

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions src/Components/Web.JS/src/Rendering/BrowserRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,28 @@ function parseMarkup(markup: string, isSvg: boolean) {
return sharedSvgElemForParsing;
} else {
sharedTemplateElemForParsing.innerHTML = markup || ' ';

// Since this is a markup string, we want to honor the developer's intent to
// evaluate any scripts it may contain. Scripts parsed from an innerHTML assignment
// won't be executable by default (https://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml)
// but that's inconsistent with anything constructed from a sequence like:
// - OpenElement("script")
// - AddContent(js) or AddMarkupContent(js)
// - CloseElement()
// It doesn't make sense to have such an inconsistency in Blazor's interactive
// renderer, and for back-compat with pre-.NET 8 code (when the Razor compiler always
// used OpenElement like above), as well as consistency with static SSR, we need to make it work.
sharedTemplateElemForParsing.content.querySelectorAll('script').forEach(oldScriptElem => {
const newScriptElem = document.createElement('script');
newScriptElem.textContent = oldScriptElem.textContent;

oldScriptElem.getAttributeNames().forEach(attribName => {
newScriptElem.setAttribute(attribName, oldScriptElem.getAttribute(attribName)!);
});

oldScriptElem.parentNode!.replaceChild(newScriptElem, oldScriptElem);
});

return sharedTemplateElemForParsing.content;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/OpenApi/src/OpenApiGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private static OpenApiResponses GetOpenApiResponses(MethodInfo method, EndpointM

if (eligibileAnnotations.Count == 0)
{
GenerateDefaultResponses(eligibileAnnotations, responseType);
GenerateDefaultResponses(eligibileAnnotations, responseType!);
}

foreach (var annotation in eligibileAnnotations)
Expand Down

0 comments on commit 6bd3734

Please sign in to comment.