Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 27, 2025

URL-encode scoped CSS Link headers for non-ASCII project names

Description

Blazor apps with non-ASCII project names (e.g. 中文) failed at runtime due to raw non-ASCII characters in generated Link headers for scoped CSS bundles.

Fixes #51038

Customer Impact

This is required to be compliant with GB18030 and deal with cases where project names use non-ascii characters.

Regression?

  • Yes
  • No

9.0

Risk

  • High
  • Medium
  • Low

Updates the manifest generation logic to ensure we URL encode path segments on the Link header. No other header that we emit needs this treatment.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@Copilot Copilot AI changed the title [WIP] [ASP.NET] Scoped CSS should URL encode the link header Fix scoped CSS URL encoding for non-ASCII project names Sep 27, 2025
@Copilot Copilot AI requested a review from javiercn September 27, 2025 11:33
Copilot finished work on behalf of javiercn September 27, 2025 11:33
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot address the feedback and make sure you don't modify unrelated files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change. Undo

Copy link
Contributor Author

Copilot AI commented Sep 27, 2025

@copilot address the feedback and make sure you don't modify unrelated files.

Addressed feedback in commit 9e13d45:

  • Reverted unnecessary RelativePath URL encoding changes (lines 235-241)
  • Reverted all unrelated test file formatting changes
  • Updated test to use proper RazorAppWithPackageAndP2PReference structure with library dependency named "项目"
  • Only the Link header value is now URL-encoded as requested

@Copilot Copilot AI requested a review from javiercn September 27, 2025 12:46
Copilot finished work on behalf of javiercn September 27, 2025 12:46
@javiercn javiercn marked this pull request as ready for review September 27, 2025 18:30
@javiercn
Copy link
Member

There seems to be this unrelated test failure that seems to be failing pretty consistently Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAot_hw_fails_with_unsupported_host_rid(targetFramework: "net10.0")

Copy link
Member

@ilonatommy ilonatommy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with dogfood sdk script and blazor app.

@javiercn javiercn changed the title Fix scoped CSS URL encoding for non-ASCII project names URL-encode scoped CSS Link headers for non-ASCII project names Sep 29, 2025
@ilonatommy
Copy link
Member

ilonatommy commented Sep 29, 2025

All failures are marked as known build errors but build analysis does not want to get green.

@ilonatommy
Copy link
Member

/ba-g build analysis should be green, all failures are known

Copilot AI and others added 2 commits September 30, 2025 11:52
…ct names

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copilot AI and others added 4 commits September 30, 2025 11:52
…er project structure

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
@javiercn javiercn force-pushed the copilot/fix-43cc9698-4150-4c8c-a307-ed00dbbcd48e branch from 69393b7 to 95dcef5 Compare September 30, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants