Ticket #7432: tag_helper_allowing_content_tag_in_helpers.diff
| File tag_helper_allowing_content_tag_in_helpers.diff, 1.4 kB (added by biocs_nerd, 2 years ago) |
|---|
-
actionpack/test/template/tag_helper_test.rb
old new 47 47 assert_dom_equal %(<div class="green">Hello world!</div>), _erbout 48 48 end 49 49 50 def test_content_tag_with_block_and_nil_erbout 51 content_tag(:div) { "Hello world!" } 52 assert_dom_equal %(<div>Hello world!</div>), "<div>Hello world!</div>" 53 end 54 55 def test_content_tag_with_block_nil_erbout_and_options 56 content_tag(:div, :class => "green") { "Hello world!" } 57 assert_dom_equal %(<div class="green">Hello world!</div>), "<div class=\"green\">Hello world!</div>" 58 end 59 50 60 def test_cdata_section 51 61 assert_equal "<![CDATA[<hello world>]]>", cdata_section("<hello world>") 52 62 end -
actionpack/lib/action_view/helpers/tag_helper.rb
old new 53 53 content = content_or_options_with_block 54 54 content_tag_string(name, content, options) 55 55 end 56 rescue NameError 57 content_tag_string(name, content, options) 56 58 end 57 59 58 60 # Returns a CDATA section with the given +content+. CDATA sections