Skip to content

[Bug]: Nested route path not resolved when path has a space in 6.4.3, but used to work on 6.4.2 #9580

@rakeshpai

Description

@rakeshpai

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 between b and c), 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions