Skip to content
Browse files

Escape the string even when the condition of link_to_unless is not sa…

…tisfied.
  • Loading branch information...
1 parent 2d2f35d commit a84c40e19a7ad7db7b5ab1c29e20e698361a62cb @dtaniwaki dtaniwaki committed Jun 10, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/url_helper.rb
View
2 actionpack/lib/action_view/helpers/url_helper.rb
@@ -380,7 +380,7 @@ def link_to_unless(condition, name, options = {}, html_options = {}, &block)
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)

0 comments on commit a84c40e

Please sign in to comment.
Something went wrong with that request. Please try again.