Jan
22
11 hours ago
started
started time in 2 hours ago
started
started time in 5 hours ago
started
started time in 8 hours ago
Jan
21
1 day ago
started
started time in 11 hours ago
Activity icon
issue

shamsup issue comment remix-run/react-router

shamsup
shamsup

Fix: allow nested splat routes to begin with "special" url-safe characters

closes #8525 and #8561

Fixes route matching to allow valid, but non-word-boundary characters(., -, ~) and url-encoded entities to appear at the beginning of a nested * route.

I pulled this character set from RFC 3986, section 2.3 Unreserved Characters:

2.3. Unreserved Characters

Characters that are allowed in a URI but do not have a reserved purpose are called unreserved. These include uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde.

  unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"

I extended this to include url-encoded entities (ie %20), but I am not 100% confident I made the character range wide enough. ([0-7][0-9A-F]). It is probably safe to expand this to any 2-digit hex code, but I wasn't able to find any concrete resources.

Let me know if additional test cases are needed for this, since I'm not too familiar with the codebase and possible untested behaviors.

shamsup
shamsup

Is there anything outstanding here or anything I could improve?

started
started time in 12 hours ago
started
started time in 13 hours ago
Activity icon
fork

mahmoudadel54 forked remix-run/react-router

⚡ Declarative routing for React
mahmoudadel54 MIT License Updated
fork time in 14 hours ago
Activity icon
fork

ghmeier forked remix-run/react-router

⚡ Declarative routing for React
ghmeier MIT License Updated
fork time in 15 hours ago
Previous