aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-02-27 18:13:08 -0500
committerGitHub <noreply@github.com>2017-02-27 18:13:08 -0500
commit93a33ec208f52f6b999fe091823e3a3e63642ab3 (patch)
tree7dccdabdf876dcde469690e91b473ba96d4b8336 /actionview/test
parent4cc1c14493e7a9bd188ee13c237366f6bc2e13f4 (diff)
parent504a9715ee60f0bc1bf67d6e81640e9bb6f29dfc (diff)
downloadrails-93a33ec208f52f6b999fe091823e3a3e63642ab3.tar.gz
rails-93a33ec208f52f6b999fe091823e3a3e63642ab3.tar.bz2
rails-93a33ec208f52f6b999fe091823e3a3e63642ab3.zip
Merge pull request #28061 from andrewhood125/strip_tags_update
Remove `encode_special_chars` option from `strip_tags`
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/template/sanitize_helper_test.rb2
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 "&lt;malformed &amp; 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 &amp; Hyde", strip_tags("Jekyll & Hyde"))
assert_equal "", strip_tags("<script>")
end