-
Notifications
You must be signed in to change notification settings - Fork 583
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
Cover all aspects of url_for in the guides #1109
Comments
Perhaps at least note that:
|
I suppose this could also cover why |
For starters i've added some more examples to the reference docs. But something in the guides would be nice. 0c513be |
This should also clarify some aspects of links generated relative to the base path. See for example the confusion here https://irclog.perlgeek.de/mojo/2017-12-13#i_15572052 about some of the tag helpers where |
I was surprised to discover the following behaviour, that placeholder values passed to # /example/foo%3Fbar
$self->url_for('example', {'placeholder' => 'foo?bar'}); # Seems to work, but...
# /example/foo%C2%BAr
$self->url_for('example', {'placeholder' => 'foo%bar'}); # Bad
# /example/foo%3Fbar
$self->url_for('example', {'placeholder' => url_escape('foo?bar'}));
# /example/foo%25bar
$self->url_for('example', {'placeholder' => url_escape('foo%bar')}); |
Using url_for with named routes is pretty well covered.
But how it can make relative paths absolute, or how the returned
Mojo::URL
object can be modified is not covered very well yet.The text was updated successfully, but these errors were encountered: