diff --git a/packages/react-router/src/path.ts b/packages/react-router/src/path.ts index 4bf687a0ca..ece9dd220d 100644 --- a/packages/react-router/src/path.ts +++ b/packages/react-router/src/path.ts @@ -220,7 +220,9 @@ export function matchByPath( if (routeSegment) { if (routeSegment.type === 'wildcard') { if (baseSegment?.value) { - const _splat = joinPaths(baseSegments.slice(i).map((d) => d.value)) + const _splat = decodeURI( + joinPaths(baseSegments.slice(i).map((d) => d.value)), + ) // TODO: Deprecate * params['*'] = _splat params['_splat'] = _splat @@ -257,7 +259,9 @@ export function matchByPath( return false } if (baseSegment.value.charAt(0) !== '$') { - params[routeSegment.value.substring(1)] = baseSegment.value + params[routeSegment.value.substring(1)] = decodeURI( + baseSegment.value, + ) } } }