diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-01-04 08:08:19 -0800 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-01-04 08:08:19 -0800 |
commit | e2e4216d645ce32ad11b2a681b45c85025de3d1d (patch) | |
tree | 7ad54e9c2025222100635d20aa55e220a94ca9e6 /actionpack | |
parent | 40cf1269074a181a23f362a910dfaf2a02f7e562 (diff) | |
parent | 38b9fbf1d98febed449a152b2098deccea48603a (diff) | |
download | rails-e2e4216d645ce32ad11b2a681b45c85025de3d1d.tar.gz rails-e2e4216d645ce32ad11b2a681b45c85025de3d1d.tar.bz2 rails-e2e4216d645ce32ad11b2a681b45c85025de3d1d.zip |
Merge pull request #4289 from rafaelfranca/patch-1
No need of html_safe here
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index d46ee4faef..1e4bebeee7 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -1093,7 +1093,7 @@ module ActionView end hidden = tag("input", "name" => options["name"], "type" => "hidden", "value" => options['disabled'] && checked ? checked_value : unchecked_value) checkbox = tag("input", options) - (hidden + checkbox).html_safe + hidden + checkbox end def to_boolean_select_tag(options = {}) diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 73b936b16e..6fe4ce65cf 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -330,6 +330,7 @@ class FormHelperTest < ActionView::TestCase end def test_check_box + assert check_box("post", "secret").html_safe? assert_dom_equal( '<input name="post[secret]" type="hidden" value="0" /><input checked="checked" id="post_secret" name="post[secret]" type="checkbox" value="1" />', check_box("post", "secret") |