aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/tag_helper_test.rb
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-04-30 16:08:06 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-04-30 16:08:06 +0300
commit16df67b1486d0651494a27d77f8e0469f4f1563f (patch)
tree75211ebc0575d8f03b0e017f881cd89512c00535 /actionpack/test/template/tag_helper_test.rb
parent02741121be86e2e5a83f10e8dc15be6700c62de4 (diff)
downloadrails-16df67b1486d0651494a27d77f8e0469f4f1563f.tar.gz
rails-16df67b1486d0651494a27d77f8e0469f4f1563f.tar.bz2
rails-16df67b1486d0651494a27d77f8e0469f4f1563f.zip
split CDATA end token in cdata_section helper
Diffstat (limited to 'actionpack/test/template/tag_helper_test.rb')
-rw-r--r--actionpack/test/template/tag_helper_test.rb5
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 &lt; 2 &amp; 3', escape_once('1 < 2 &amp; 3')
end