Outlet route is not recognised if URL is encoded #43523
Labels
area: router
P4
A relatively minor issue that is not relevant to core functions
router: config matching/activation/validation
Milestone
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
In fact, I want to re-open this issue: #26035
Current behaviour
Some software tools change URLs escaping some symbols, like
(
and)
So URL like this:
https://site.com/(modal:reset)
Becomes:
https://site.com/%28modal:reset%29
which is still a valid URL.When such URL is opened, Angular cannot find such route (reproduced on the latest Angular 12.2.5 - https://stackblitz.com/edit/angular-9xudgi?file=src/app/app.component.html).
Expected behaviour
URL should be decoded before looking for an activated route.
Minimal reproduction of the problem with instructions
Possible solution
To solve this I use custom
UrlSerializer
like suggested here: https://digitalflask.com/blog/extend-angular-routerThis works fine, but I wonder why decoding isn't implemented by default?
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-9xudgi?file=src/app/app.component.html
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
No response
The text was updated successfully, but these errors were encountered: