From 826f0bd42f7406571923a4889ad895dadae59d4f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 29 Sep 2007 20:19:33 +0000 Subject: Fixed that strip_tags blows up with invalid html (closes #9730) [lifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/text_helper_test.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 979e436556..7520e49779 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -48,6 +48,7 @@ class TextHelperTest < Test::Unit::TestCase def test_strip_links assert_equal "Dont touch me", strip_links("Dont touch me") + assert_equal "on my mind\nall day long") assert_equal "0wn3d", strip_links("0wn3d") assert_equal "Magic", strip_links("Magic") @@ -537,6 +538,8 @@ class TextHelperTest < Test::Unit::TestCase end def test_strip_tags + assert_equal("<<")) assert_equal("Dont touch me", strip_tags("Dont touch me")) assert_equal("This is a test.", strip_tags("

This is a test.

")) assert_equal("Weirdos", strip_tags("Wei<a onclick='alert(document.cookie);'/>rdos")) -- cgit v1.2.3