aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2012-02-01 10:10:53 -0800
committerJosé Valim <jose.valim@plataformatec.com.br>2012-02-01 10:10:53 -0800
commit049dc500b632ca1a05d41a0c5454946f24d15035 (patch)
tree007aa064767f9dd56e4b8855914eb94612641f44 /actionpack/lib/action_view
parentd7a85c5c51534ed627cc50d0086284006a62ac71 (diff)
parentceb1ea632e8b2837a18a44d76eb926575dbb14ac (diff)
downloadrails-049dc500b632ca1a05d41a0c5454946f24d15035.tar.gz
rails-049dc500b632ca1a05d41a0c5454946f24d15035.tar.bz2
rails-049dc500b632ca1a05d41a0c5454946f24d15035.zip
Merge pull request #4804 from rafaelfranca/check_box-fix
check_box with nil as unchecked value should be HTML safe
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/tags/check_box.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/check_box.rb b/actionpack/lib/action_view/helpers/tags/check_box.rb
index b3bd6eb2ad..7ad5de0596 100644
--- a/actionpack/lib/action_view/helpers/tags/check_box.rb
+++ b/actionpack/lib/action_view/helpers/tags/check_box.rb
@@ -25,7 +25,7 @@ module ActionView
add_default_name_and_id(options)
end
- hidden = @unchecked_value ? tag("input", "name" => options["name"], "type" => "hidden", "value" => @unchecked_value, "disabled" => options["disabled"]) : ""
+ hidden = @unchecked_value ? tag("input", "name" => options["name"], "type" => "hidden", "value" => @unchecked_value, "disabled" => options["disabled"]) : "".html_safe
checkbox = tag("input", options)
hidden + checkbox
end