Skip to content

[release/8.0] Update SDK #51059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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