fix(@angular/ssr): decode route segments when building and matching route tree
Updates the `getPathSegments` method in `RouteTree` to decode each path segment using `decodeURIComponent` after splitting the route by `/`. This ensures that encoded characters in URL segments (such as spaces or encoded slashes) are correctly interpreted when matching incoming requests against the route tree. This prevents issues where encoded segments would fail to match their corresponding route definitions or wildcard patterns in the tree. Also reverts experimental changes in `url.ts` and `router.ts` regarding matrix parameter handling, as the simple change in `route-tree.ts` is sufficient to resolve the issue and passes all tests. Adds a test in `router_spec.ts` to verify that a URL with an encoded parameter containing spaces and slashes (`Bob%20%2F%20Roberts`) correctly matches a wildcard route (`/user/*`). Fixes #33044
A
Alan Agius committed
53b9623b7b4ee2266332f57e71896361dac21db8
Parent: c34c569
Committed by Alan Agius <alan.agius4@gmail.com>
on 4/28/2026, 7:00:14 AM