0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/e2e/react-router/basic-file-based/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 test(e2e): use locally hosted api over an external provider (#4725) 2025-07-22 00:15:28 +02:00
app.spec.ts refactor: signal based reactivity (#6704) 2026-03-20 10:33:28 +01:00
fullpath-types.spec.ts fix: fullpath handling (#6404) 2026-01-17 17:21:10 +01:00
hover-preload-hash.spec.ts fix: Links always scroll to URL hash on hover (#5930) (#5944) 2025-11-23 01:05:34 +01:00
mask.spec.ts fix(router-core): correctly resolve custom params from declarative masks when building the masked url (#5756) 2025-12-02 18:31:16 +02:00
non-nested-paths.spec.ts refactor(router-core): simplify matchId (#5807) 2025-11-11 00:55:46 +01: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
params.spec.ts fix(router): ensure useParams returns parsed params when strict is false (#6387) 2026-02-09 02:44:30 +02:00
redirect.spec.ts feat: add Route.redirect and getRouteApi.redirect (#6373) 2026-01-14 21:50:58 +01:00
relative.spec.ts fix(react-router, solid-router): reduce useNavigate reactivity on path changes (#5037) 2025-08-31 13:48:25 +02:00
scroll-into-view.spec.ts feat(react-router): implement hash change "Scroll Into View" option (#2996) 2024-12-14 08:58:03 +01:00
search-params.spec.ts refactor(router-core): consistent Unicode handling (#5736) 2025-11-06 03:35:59 +02:00