diff options
author | Phil Darnowsky <pdarnows@yahoo.com> | 2009-10-07 14:49:38 -0400 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2009-10-15 09:49:07 +1300 |
commit | 1b3195b63ca44f0a70b61b75fcf4991cb2fbb944 (patch) | |
tree | 1afde88f4b690d4d1a58a27068c67cb45f35536d /actionpack/lib | |
parent | a41c6c35cadf75bfd4bf0a17113ae37d628896e8 (diff) | |
download | rails-1b3195b63ca44f0a70b61b75fcf4991cb2fbb944.tar.gz rails-1b3195b63ca44f0a70b61b75fcf4991cb2fbb944.tar.bz2 rails-1b3195b63ca44f0a70b61b75fcf4991cb2fbb944.zip |
ActionView.url_for doesn't escape by default
ActionView::Helpers::UrlHelper#url_for used to escape the URLs it generated by
default. This was most commonly seen when generating a path with multiple
query parameters, e.g.
url_for(:controller => :foo, :action => :bar, :this => 123, :that => 456)
would return
http://example.com/foo/bar?that=456&this=123
escaping an ampersand that shouldn't be escaped. This is both wrong and
inconsistent with the behavior of ActionController#url_for, and is changed.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index e651bc17a9..44e7073227 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -83,7 +83,7 @@ module ActionView options when Hash options = { :only_path => options[:host].nil? }.update(options.symbolize_keys) - escape = options.key?(:escape) ? options.delete(:escape) : true + escape = options.key?(:escape) ? options.delete(:escape) : false @controller.send(:url_for, options) when :back escape = false |