diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-04-30 06:47:07 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-04-30 06:47:07 -0700 |
commit | 7d5146efad1c3bd471f315e4d259e00052eacbb6 (patch) | |
tree | 67fd4f0647738b8136873f702564b2cbf8c43e29 /actionpack/test/template | |
parent | bca9a9e926db11c5c9a438493d49317146c64fb6 (diff) | |
parent | 16df67b1486d0651494a27d77f8e0469f4f1563f (diff) | |
download | rails-7d5146efad1c3bd471f315e4d259e00052eacbb6.tar.gz rails-7d5146efad1c3bd471f315e4d259e00052eacbb6.tar.bz2 rails-7d5146efad1c3bd471f315e4d259e00052eacbb6.zip |
Merge pull request #5705 from lest/patch-3
split CDATA end token in cdata_section helper
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/tag_helper_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index 32b33b4a55..7161d107b3 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -91,6 +91,11 @@ class TagHelperTest < ActionView::TestCase assert_equal "<![CDATA[<hello world>]]>", cdata_section("<hello world>") end + def test_cdata_section_splitted + assert_equal "<![CDATA[hello]]]]><![CDATA[>world]]>", cdata_section("hello]]>world") + assert_equal "<![CDATA[hello]]]]><![CDATA[>world]]]]><![CDATA[>again]]>", cdata_section("hello]]>world]]>again") + end + def test_escape_once assert_equal '1 < 2 & 3', escape_once('1 < 2 & 3') end |