diff options
author | Andrew Hood <andrewhood125@gmail.com> | 2017-02-27 10:51:26 -0800 |
---|---|---|
committer | Andrew Hood <andrewhood125@gmail.com> | 2017-02-27 14:17:17 -0800 |
commit | 504a9715ee60f0bc1bf67d6e81640e9bb6f29dfc (patch) | |
tree | 7dccdabdf876dcde469690e91b473ba96d4b8336 /actionview/test/template | |
parent | 4cc1c14493e7a9bd188ee13c237366f6bc2e13f4 (diff) | |
download | rails-504a9715ee60f0bc1bf67d6e81640e9bb6f29dfc.tar.gz rails-504a9715ee60f0bc1bf67d6e81640e9bb6f29dfc.tar.bz2 rails-504a9715ee60f0bc1bf67d6e81640e9bb6f29dfc.zip |
Remove `encode_special_chars` option from `strip_tags`
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/sanitize_helper_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionview/test/template/sanitize_helper_test.rb b/actionview/test/template/sanitize_helper_test.rb index c8963fee9c..11ed55456f 100644 --- a/actionview/test/template/sanitize_helper_test.rb +++ b/actionview/test/template/sanitize_helper_test.rb @@ -10,6 +10,7 @@ class SanitizeHelperTest < ActionView::TestCase assert_equal "on my mind\nall day long", strip_links("<a href='almost'>on my mind</a>\n<A href='almost'>all day long</A>") assert_equal "Magic", strip_links("<a href='http://www.rubyonrails.com/'>Mag<a href='http://www.ruby-lang.org/'>ic") assert_equal "My mind\nall <b>day</b> long", strip_links("<a href='almost'>My mind</a>\n<A href='almost'>all <b>day</b> long</A>") + assert_equal "<malformed & link", strip_links('<<a href="https://example.org">malformed & link</a>') end def test_sanitize_form @@ -26,6 +27,7 @@ class SanitizeHelperTest < ActionView::TestCase assert_equal("Dont touch me", strip_tags("Dont touch me")) assert_equal("This is a test.", strip_tags("<p>This <u>is<u> a <a href='test.html'><strong>test</strong></a>.</p>")) assert_equal "This has a here.", strip_tags("This has a <!-- comment --> here.") + assert_equal("Jekyll & Hyde", strip_tags("Jekyll & Hyde")) assert_equal "", strip_tags("<script>") end |