Reproduction
Description
When a route parameter contains both spaces and percent signs (e.g. 2% 0 g - 2), React Router v7 incorrectly parses it and double-encodes parts of the value. As a result, the loader receives a malformed parameter instead of the original value.
Reproduction:
Open below link and click on malformed link
https://stackblitz.com/edit/github-xxbxv2kq-zckgutyc?file=app%2Froutes%2Fmalformed.tsx
System Info
Used Package Manager
pnpm
Expected Behavior
params.id should equal exactly:
2% 0 g - 2
Actual Behavior
React Router returns:
2%%200%20g%20-%202