0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/packages/router-core/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
..
build-location.test.ts fix(router-core): allow retained search params to reset to defaults (#7559) 2026-06-06 10:30:23 +02:00
callbacks.test.ts refactor: shorten internal router store names (#7152) 2026-04-11 13:21:43 +02:00
closing-tag-detection.bench.ts fix: fix streaming (#7497) 2026-05-29 02:27:23 +02:00
curly-params-smoke.test.ts feat(router-core): validate params while matching (#5936) 2026-01-08 12:42:43 +01:00
dangerous-protocols.test.ts refactor: signal based reactivity (#6704) 2026-03-20 10:33:28 +01:00
getNormalizedURL.test.ts fix(start-server-core): redirect misinterpreted protocol-relative URLs (#6600) 2026-02-07 02:00:19 +02:00
getOrigin.test.ts fix: hardening (#6337) 2026-01-09 00:38:55 +01:00
granular-stores.test.ts refactor: shorten internal router store names (#7152) 2026-04-11 13:21:43 +02:00
hydrate.test.ts feat(start): support rsbuild iife client output (#7477) 2026-05-24 02:02:05 +02:00
load.test-d.ts fix: update error handling in MatchInner to access error data directly (#4746) 2025-11-19 19:46:29 +01:00
load.test.ts fix: fix primitive beforeLoad errors (#7505) 2026-05-30 01:29:42 +02:00
lru.test.ts refactor(router-core): add LRU cache in front of parsePathname (#4752) 2025-07-23 11:16:59 +02:00
manifest.test.ts feat(start): support rsbuild iife client output (#7477) 2026-05-24 02:02:05 +02:00
mask.test.ts refactor: signal based reactivity (#6704) 2026-03-20 10:33:28 +01:00
match-by-path.test.ts feat(router-core): validate params while matching (#5936) 2026-01-08 12:42:43 +01:00
match-params.test.ts feat(router-core): params.priority route option as tie breaker in matching algorithm (#7411) 2026-05-16 16:20:12 +02:00
new-process-route-tree.test.ts feat(router-core): params.priority route option as tie breaker in matching algorithm (#7411) 2026-05-16 16:20:12 +02:00
optional-path-params-clean.test.ts feat(router-core): validate params while matching (#5936) 2026-01-08 12:42:43 +01:00
optional-path-params.test.ts fix(router-core): null prototype input/output objects (#6882) 2026-03-10 20:22:35 +01:00
path.test.ts chore: fix duplicate "the" typo across router packages (#7323) 2026-05-02 16:38:17 +02:00
qss.test.ts refactor(router-core): simplify defaultParseSearch & defaultStringifySearch (#4985) 2025-08-19 08:42:53 +02:00
RawStream.test.ts feat: RawStream (#6231) 2025-12-27 15:57:16 +01:00
redirect.test-d.ts feat: add Route.redirect and getRouteApi.redirect (#6373) 2026-01-14 21:50:58 +01:00
remountDeps.test-d.ts fix(router-core): fix typing of search in remountDeps (#5362) 2025-10-05 23:06:57 +02:00
remountDeps.test.ts fix(router-core): fix typing of search in remountDeps (#5362) 2025-10-05 23:06:57 +02:00
rewrite.test.ts perf: optimize and test rewrite (#7448) 2026-05-20 22:54:58 +02:00
routerTestUtils.ts refactor: switch router stores to atom get/set API (#7150) 2026-04-11 12:41:57 +02:00
scroll-restoration-script.test.ts fix: Fix hash scrolling with resetScroll={false} (#7464) 2026-05-21 22:54:26 +02:00
scroll-restoration.test.ts fix(router-core): skip scroll restoration setup when disabled (#7562) 2026-06-06 11:37:03 +02:00
searchMiddleware.test-d.ts fix(router-core): fix search middleware type to use schema output (#7381) 2026-06-05 22:02:05 +02:00
searchMiddleware.test.ts fix(router-core): respect stripped params in retainSearchParams (#7555) 2026-06-06 00:49:14 +02:00
searchParams.test.ts test(router-core): add search param serialization / deserialization unit tests (#4987) 2025-08-19 08:16:58 +02:00
serializer-recursion.test-d.ts efp (#7144) 2026-04-11 01:43:05 +02:00
serializer.test-d.ts efp (#7144) 2026-04-11 01:43:05 +02:00
ssr-match-id.test.ts fix(router-core): dehydrate SSR match IDs with non-path encoding (#6742) 2026-02-23 17:12:40 +01:00
ssr-server-cleanup.test.ts fix: fix streaming (#7497) 2026-05-29 02:27:23 +02:00
ssr-server-manifest.test.ts feat(start): support rsbuild iife client output (#7477) 2026-05-24 02:02:05 +02:00
transformStreamBackpressure.perf.test.ts fix: fix streaming (#7497) 2026-05-29 02:27:23 +02:00
transformStreamWithRouter.test.ts fix: fix streaming (#7497) 2026-05-29 02:27:23 +02:00
tsr-script-teardown.test.ts Revert #7524 (#7533) 2026-06-05 00:04:55 +02:00
utils.test-d.ts fix: only call head() when loaderData is available (#3410) 2025-02-13 13:06:13 -07:00
utils.test.ts fix(router-core): preserve percent-encoded URL-unsafe chars in decodeSegment (#7695) 2026-06-30 23:27:21 +02:00