TanStack
OSS
router
Sign in / Sign up
Open main menu
router
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
main
4814d4ef fix(router-core): use encodeURIComponent for splat route params (#6520) * fix(router-core): use encodeURIComponent for splat route params Use encodeURIComponent instead of encodeURI for splat route parameters to properly encode spaces, plus signs, and other special characters. This fixes an SSR redirect loop that occurs when: 1. User navigates to a splat route with encoded characters (e.g., %20) 2. TanStack Router decodes params with decodeURIComponent 3. When rebuilding URL, encodeURI doesn't encode spaces/special chars 4. URL mismatch triggers redirect loop (307 redirects) encodeURIComponent properly encodes these characters, preventing the mismatch while still preserving forward slashes as path separators. * update tests to use correct encoding for splat params * use encodePathParam for splat/catch-all * perf(router-core): add early return for URL-safe splat values Add performance optimization that skips the split/map/join operation when splat values only contain URL-safe characters (alphanumeric, dash, period, underscore, tilde, exclamation, forward slash). This avoids unnecessary processing in the hot path for common cases. * fix(router-core): encode whitespace in encodeNonAscii Update encodeNonAscii to also encode whitespace characters (spaces, tabs, etc.) in addition to non-ASCII characters. This fixes SSR redirect loops where: 1. Request URL contains encoded spaces: /path/file%20name.pdf 2. parseLocation decodes pathname: /path/file name.pdf 3. buildLocation calls encodeNonAscii but spaces weren't encoded 4. URL mismatch triggers redirect loop Now encodeNonAscii properly encodes: - Whitespace characters (spaces become %20) - Non-ASCII/unicode characters (including emojis) Other ASCII special characters (parentheses, brackets, etc.) are preserved as they are valid in URL paths. * refactor(router-core): use regex in encodeNonAscii like original * refactor(router-core): rename encodeNonAscii to encodePathLikeUrl Rename the function to better reflect its expanded responsibility of encoding paths the same way new URL() would, including: - Whitespace characters (spaces → %20, tabs → %09) - Non-ASCII/Unicode characters (emojis, accented characters) The old name 'encodeNonAscii' was misleading since the function now encodes more than just non-ASCII characters. --------- Co-authored-by: Nico Lynzaad <nlynzaad@zylangroup.com> Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
2 months ago
by thejasonxie
t
Succeeded
6520
52a83599 refactor(router-core): rename encodeNonAscii to encodePathLikeUrl Rename the function to better reflect its expanded responsibility of encoding paths the same way new URL() would, including: - Whitespace characters (spaces → %20, tabs → %09) - Non-ASCII/Unicode characters (emojis, accented characters) The old name 'encodeNonAscii' was misleading since the function now encodes more than just non-ASCII characters.
2 months ago
by thejasonxie
t
Failed
6520
52a83599 refactor(router-core): rename encodeNonAscii to encodePathLikeUrl Rename the function to better reflect its expanded responsibility of encoding paths the same way new URL() would, including: - Whitespace characters (spaces → %20, tabs → %09) - Non-ASCII/Unicode characters (emojis, accented characters) The old name 'encodeNonAscii' was misleading since the function now encodes more than just non-ASCII characters.
2 months ago
by thejasonxie
t
Failed
6520
52a83599 refactor(router-core): rename encodeNonAscii to encodePathLikeUrl Rename the function to better reflect its expanded responsibility of encoding paths the same way new URL() would, including: - Whitespace characters (spaces → %20, tabs → %09) - Non-ASCII/Unicode characters (emojis, accented characters) The old name 'encodeNonAscii' was misleading since the function now encodes more than just non-ASCII characters.
2 months ago
by thejasonxie
t
Succeeded
6520
bef5cb9b refactor(router-core): use regex in encodeNonAscii like original
2 months ago
by thejasonxie
t
Failed
6520
885d0084 refactor(router-core): use regex in encodeNonAscii like original
2 months ago
by thejasonxie
t
Failed
6520
8846a332 refactor(router-core): use regex in encodeNonAscii like original
2 months ago
by thejasonxie
t
Previous page
Previous
Next
Next page