-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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 routes under an id with a trailing =
fail to match
#8288
Labels
Comments
Here is an example of a failing test for a base64 encoded id (e.x. the output of Happy to contribute back with a fix! |
Thanks for the bug report. I think the correct regex should probably be |
This was referenced Nov 18, 2021
This should be fixed in 6.1.0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of React Router are you using?
6.0.0
Steps to Reproduce
Create a nested route
If the
:dahboardId
contains an equals sign at the end (e.x. a relay Id likeRGFzaGJvYXJkOjE2MzU=
), the generated regex^\/dashboards\/([^\/]+)(?:\b|$)
fails to capture the=
at the end when the pathname is/dashboards/RGFzaGJvYXJkOjE2MzU=/edit
Expected Behavior
The generated regex that matches the
:dashboardId
should capture all the way up to the next forward slash.Actual Behavior
pathname.match
matches up to the=
(/dashboards/RGFzaGJvYXJkOjE2MzU
) but fails to capture the trailing=
, causing the router to say that there are no matches for the nested route.The text was updated successfully, but these errors were encountered: