-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Fix/double encoding #14621
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
base: dev
Are you sure you want to change the base?
Fix/double encoding #14621
Conversation
|
|
Hi @ynakoo, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
|
CLA signed |
|
@ynakoo You need to add your name to the contributors.yml file. Can you rebase against the latest |
|
Actually, I was able to do that for you. I guess they changed the permissions for maintainers to force push. |
Fixes a bug where route parameters containing both spaces and percent signs were incorrectly double-encoded during path generation. Implements a safe encoder that preserves already-encoded sequences while ensuring RFC 3986 compliance.
0e578e3 to
e8777d7
Compare
60ddb1f to
74f65cc
Compare
|
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
|
74f65cc to
2e61079
Compare
Fix: Prevent Double-Encoding of Percent Signs in Route Parameters
This PR fixes an issue where route parameters containing percent-encoded sequences (e.g., %20, %25) were being double-encoded when passed through generatePath.
The root cause was that matchPath partially decodes certain sequences (like %2F → /) while leaving other encoded sequences intact, which caused generatePath to treat already-encoded values as raw text and encode them again.
Example of incorrect behavior:
%20 → %2520
%25 → %2525
This resulted in incorrect URLs and broke RFC 3986–compliant workflows.
Technical Details
FIXES ISSUE
#14619