-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
NavLink component is active on wrong path potential fix #48627 #48713
Conversation
Thanks for your PR, @adanmaftei. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
Update check for prefix to include # and ?
Hi @adanmaftei If I did everything right and understand the issue correctly, then the method // returns true but should be false
Console.WriteLine(IsStrictlyPrefixWithSeparator("/abc-def", "/abc")); I also created a Pull Request for the same issue: #48718 // Code in my PR returns true but this is also the current behavior.
// This is what I mean with "less visible/observable" change
Console.WriteLine(MyIsStrictlyPrefixWithSeparator("/abc*def", "/abc")); I think that NavLink should only check the path and ignore query & fragment part of URLs (that would be a breaking change) or allow customization. |
Hi @etemi! I did another commit and got these results below, it was a quick attempt to fix the issue. |
@dotnet-policy-service agree |
Thanks for the effort you've put into this, @adanmaftei. We're going to move forward with #48718 at this time. That change is scoped to a smaller set of separators, which makes it less likely to unintentionally break customers depending on the existing behavior. |
Hi @MackinnonBuck. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
NavLink component is active on the wrong path potential fix #48627
Summary of the changes (Less than 80 chars)
Description
Added an additional check for the separator character, to check if it is an allowed char in a URI, such as '/' or '?'.
Check the attachment file for some testing evidence.
Fixes #48627