[Blazor] Fixes encoded /
on Blazor Router
#53538
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes handling of encoded values within Blazor Routing
As part of .NET 8.0 we replaced the Blazor Router implementation with an equivalent implementation provided by ASP.NET to bring the Blazor implementation to out of the box feature parity with the ASP.NET implementation.
As part of that, we changed the way encoded are processed before we handle them to the Blazor router, which resulted in a regression as we were eagerly decoding
%2F
(/
) values. In addition to that, we also determined that the values were not being decoded (a custom step that Blazor does)Description
%2F
characters in the path before running routing.Fixes #52808, #53138, #53262 #53668
Customer Impact
/
in their application paths (for example, route parameters that take in a URL) won't be able to do so.Regression?
7.0, the values were presented unencoded to the user and
%2F
was handled correctly and route values were decoded before being passed as parameters.Risk
We've added automated tests to validate that the scenario behaves correctly and tests that verify that the implementation on the server and the client behaves consistently and accordingly to previous Blazor versions.
We've replaced the implementation that was handling the decoding in the Blazor Router (which was the source of the problem) with the implementation used by ASP.NET Core.
Verification
Packaging changes reviewed?
When servicing release/2.1