aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-01-12 22:05:52 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2011-01-12 22:05:52 -0200
commit1de47a0d56328768dfba0e5f86e1ff9491e62c20 (patch)
tree9a637c8c58c4b488f79fb958b03c5bb091d76ca6 /actionpack/test/template
parent20897a6c2cef9c70b97eee1bcd2ed5b78303a274 (diff)
downloadrails-1de47a0d56328768dfba0e5f86e1ff9491e62c20.tar.gz
rails-1de47a0d56328768dfba0e5f86e1ff9491e62c20.tar.bz2
rails-1de47a0d56328768dfba0e5f86e1ff9491e62c20.zip
button_tag should escape it content
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/form_tag_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb
index 0d29b962d5..4a584b8db8 100644
--- a/actionpack/test/template/form_tag_helper_test.rb
+++ b/actionpack/test/template/form_tag_helper_test.rb
@@ -413,6 +413,13 @@ class FormTagHelperTest < ActionView::TestCase
)
end
+ def test_button_tag_escape_content
+ assert_dom_equal(
+ %(<button name="button" type="reset" disabled="disabled">&lt;b&gt;Reset&lt;/b&gt;</button>),
+ button_tag("<b>Reset</b>", :type => "reset", :disabled => true)
+ )
+ end
+
def test_image_submit_tag_with_confirmation
assert_dom_equal(
%(<input type="image" src="/images/save.gif" data-confirm="Are you sure?" />),