react-router: [Bug] Unicode routes

Using a Unicode route doesn’t work.

Version

4.0.0-alpha.6

Test Case

<Match pattern="/اضف" component={AddPlace} />

Steps to reproduce

Simply use any Unicode route. Neither client nor server-side rendering will match.

Expected Behavior

React-router should match the route correctly.

Actual Behavior

The route is missed.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (12 by maintainers)

Commits related to this issue

Most upvoted comments

I opened ReactTraining/history#442, which I believe should fix this issue.

I think that this is the same issue that @bkniffler was having in #4124

Just chiming in, I think I hit a related issue when upgrading from v4.0.0-alpha6 to v4.0.0-beta6.

In my case direct links to urls with a space ( encoded as %20) no longer work, they used to work in the alpha version.

I tracked it down to a decodeUriComponent that was present in alpha but is missing from the beta.