Skip to content

Update SDK #51240

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 7 commits into from
Oct 20, 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
6 changes: 5 additions & 1 deletion eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@
<UsagePattern IdentityGlob="System.Composition/*7.0.0*" />
<UsagePattern IdentityGlob="System.Threading.Tasks.Extensions/*4.5.3*" />

<!--
To be removed when the SDK is bringing this version, see https://github.com/dotnet/aspnetcore/issues/51339
-->
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/*8.0*" />

<!-- These are coming in via runtime but the source-build infra isn't able to automatically pick up the right intermediate. -->
<UsagePattern IdentityGlob="Microsoft.NET.ILLink.Tasks/*8.0.*" />
<UsagePattern IdentityGlob="Microsoft.NET.ILLink.Tasks/*9.0.*" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/*9.0.*" />

<!-- Transivite dependency of Microsoft.CodeAnalysis.ExternalAccess.AspNetCore -> Microsoft.CodeAnalysis.Features.
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "9.0.100-alpha.1.23502.7"
"version": "9.0.100-alpha.1.23504.14"
},
"tools": {
"dotnet": "9.0.100-alpha.1.23502.7",
"dotnet": "9.0.100-alpha.1.23504.14",
"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 @@ -186,7 +186,7 @@ private static OpenApiResponses GetOpenApiResponses(MethodInfo method, EndpointM
eligibileAnnotations[statusCode] = (discoveredTypeAnnotation, discoveredContentTypeAnnotation);
}

if (eligibileAnnotations.Count == 0)
if (responseType != null && eligibileAnnotations.Count == 0)
{
GenerateDefaultResponses(eligibileAnnotations, responseType);
}
Expand Down