0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/e2e/react-start/basic/tests
Collin Dillinger 9809a0619d
fix(router-core): preserve percent-encoded URL-unsafe chars in decodeSegment (#7695)
* fix(router-core): preserve percent-encoded URL-unsafe chars in decodeSegment

Replace sanitizePathSegment (which stripped control characters) with a
re-encode step that keeps WHATWG path percent-encode set characters and
control characters in their encoded form after decodeURI.

This preserves the existing decodeURI-based approach which correctly
handles multi-byte UTF-8 sequences, while fixing the mismatch between
the original request URL and the router's internal representation that
caused infinite 307 redirect loops on paths containing these characters.

Fixes #7587.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: apply automated fixes

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Flo <me@florianpellet.com>
History 2026-06-30 23:27:21 +02:00
..
setup chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
utils chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
client-only.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
client-output.spec.ts feat(rsbuild): add RSC support (#7509) 2026-05-30 15:16:10 +02:00
error-component.spec.ts fix: fix primitive beforeLoad errors (#7505) 2026-05-30 01:29:42 +02:00
navigation.spec.ts fix: fix plain TypeScript parser handling (#7342) 2026-05-05 01:57:21 +02:00
not-found.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
open-redirect-prevention.spec.ts fix(router-core): preserve percent-encoded URL-unsafe chars in decodeSegment (#7695) 2026-06-30 23:27:21 +02:00
prerendering.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
raw-stream.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
redirect.spec.ts chore: stabilize tests (#7503) 2026-05-29 02:17:35 +02:00
root-scripts.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
script-duplication.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
search-params.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
special-characters.spec.ts fix(router-core): preserve percent-encoded URL-unsafe chars in decodeSegment (#7695) 2026-06-30 23:27:21 +02:00
streaming.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00
type-only-reexport.spec.ts chore: unify react-start basic e2e mode projects (#7206) 2026-04-18 22:52:56 +02:00