-
Notifications
You must be signed in to change notification settings - Fork 3k
State transitions escape slashes for path-like parameters #519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yup, that's how that works. |
Hmmm I think it is a valid bug actually: https://github.com/angular-ui/ui-router/blob/master/src/urlMatcherFactory.js#L33-L35 |
Definitely a bug, at least for Perhaps a convention can be introduced for "raw" params? Something along the lines of {
url: '/document/{&relativePath:.*}'
} This patch seems to work for the above suggestion: https://gist.github.com/ntijanic/7116905/revisions |
@timkindberg There are no tests to suggest that catch-all parameters are supposed to work in reverse (and the lack of explicitness that would entail would be a security vulnerability anyway). @ntijanic Work has already been started to allow typed parameters, which means escaping/unescaping would be user-controllable, which would allow for the above, and be a better system than additional code & complexity added to enable one special case. |
Ok I see. Makes sense. |
Closing in favor of #454. |
For cases such as
$stateProvider.state('resource', {url: '/resource/{path:.*}'})
,$state.go('resource', {path: 'a/b'})
attempts to go to /resource/a%2Fb.http://plnkr.co/edit/OoMqgB
The text was updated successfully, but these errors were encountered: