Fix percent encoding in relative path navigation#14786
Fix percent encoding in relative path navigation#14786veeceey wants to merge 3 commits intoremix-run:mainfrom
Conversation
🦋 Changeset detectedLatest commit: c76ea73 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hi @veeceey, 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 |
|
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
When navigating using relative links, path segments containing %25 (which decodes to %) were being left as raw % characters in the URI. This caused decoding failures and browser refresh issues. The fix adds encoding of % to %25 before encoding ? and # characters. The order is important to avoid double-encoding. Fixes remix-run#14510
f48505c to
c76ea73
Compare
Fixes #14510
When navigating using relative links, path segments containing %25 (percent) were being left as raw % characters, causing decoding failures and browser refresh issues.
This fix adds encoding of % to %25 before encoding ? and # characters in the useRoutesImpl hook. The order is important to avoid double-encoding.
Test results: 114 test suites passed, 2429 tests passed including params-decode-test.tsx