aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authordtaniwaki <daisuketaniwaki@gmail.com>2013-06-10 23:49:49 -0400
committerdtaniwaki <daisuketaniwaki@gmail.com>2013-06-16 22:28:40 -0400
commita84c40e19a7ad7db7b5ab1c29e20e698361a62cb (patch)
treef447e8e3cf7471e4e3b8990f18dc7e8722928382 /actionpack/lib/action_view
parent2d2f35ddf24bca89ef8c8e012bb230b721b40294 (diff)
downloadrails-a84c40e19a7ad7db7b5ab1c29e20e698361a62cb.tar.gz
rails-a84c40e19a7ad7db7b5ab1c29e20e698361a62cb.tar.bz2
rails-a84c40e19a7ad7db7b5ab1c29e20e698361a62cb.zip
Escape the string even when the condition of link_to_unless is not satisfied.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb2
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 8a83f6f356..19e5941971 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -380,7 +380,7 @@ module ActionView
if block_given?
block.arity <= 1 ? capture(name, &block) : capture(name, options, html_options, &block)
else
- name
+ ERB::Util.html_escape(name)
end
else
link_to(name, options, html_options)