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>
C
Collin Dillinger committed
9809a0619d4ed3fe8c2a393af5b9eca4b6c7695b
Parent: bb2daa6
Committed by GitHub <noreply@github.com>
on 6/30/2026, 9:27:21 PM