diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-13 22:44:45 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-13 22:44:45 +0000 |
commit | acb80e3d0e96725fffad7caa42cc33281714450a (patch) | |
tree | d5ebf2775c3521d34b18da308a215d3a09c5ed6f /actionpack/lib | |
parent | 2cad95d851ae72dadc1479ea2a21cd056dc8f06e (diff) | |
download | rails-acb80e3d0e96725fffad7caa42cc33281714450a.tar.gz rails-acb80e3d0e96725fffad7caa42cc33281714450a.tar.bz2 rails-acb80e3d0e96725fffad7caa42cc33281714450a.zip |
Escape query strings in the href attribute of URLs created by url_helper. #2333
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 4b7a2270dc..118b5b158b 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -46,7 +46,7 @@ module ActionView else tag_options = nil end - url = options.is_a?(String) ? options : url_for(options, *parameters_for_method_reference) + url = html_escape(options.is_a?(String) ? options : url_for(options, *parameters_for_method_reference)) "<a href=\"#{url}\"#{tag_options}>#{name||url}</a>" end @@ -107,7 +107,7 @@ module ActionView url, name = options.is_a?(String) ? [ options, name || options ] : - [ url_for(options), name || url_for(options) ] + [ url_for(options), name || html_escape(url_for(options)) ] html_options.merge!("type" => "submit", "value" => name) |