-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[Bug]: Nested route path not resolved when path has a space in 6.4.3, but used to work on 6.4.2 #9580
Comments
@brophdawg11 Is this a regression from #9477? |
Thanks for the reproduction @rakeshpai! @timdorr yeah this looks like we have an encoded/non-encoded mismatch in the logic for calculating the remaining pathname for descendant routes. I'll look into a fix for the next release here 👍 |
Fixed in #9589, should be out in a prerelease next week and a stable likely the following week 👍 |
This is now available in |
What version of React Router are you using?
6.4.3
Steps to Reproduce
I've created a minimal reproduction CodeSandbox here: https://codesandbox.io/s/frosty-black-92if0p?file=/src/App.js
Navigate to
/abc
, and everything works fine and you should see a 'Hello world' on the screen.However, navigate to
/ab%20c
, (URL-encoded space betweenb
andc
), and you don't see the 'hello world' anymore, implying that react-router-dom thinks that the path with a space in it is not a match.This used to work fine until the most recent 6.4.3. To try this out, switch the dependency in the CodeSandbox to 6.4.2 and hit
/ab%20c
, and you should see the 'hello world'.Expected Behavior
6.4.3 should match paths that have a space in it.
Actual Behavior
6.4.3 doesn't match paths with a space in it.
The text was updated successfully, but these errors were encountered: