aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/html-scanner/sanitizer_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-12-05 02:34:36 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-12-05 02:34:36 +0000
commit3a622d0045771459e6d4cc32307f31f87e5b938a (patch)
treed7710492e87f30a09fc52833d3b1d46fda9f8efe /actionpack/test/controller/html-scanner/sanitizer_test.rb
parenta5fded3e88147769f4461d36bd60764ebcb95bc3 (diff)
downloadrails-3a622d0045771459e6d4cc32307f31f87e5b938a.tar.gz
rails-3a622d0045771459e6d4cc32307f31f87e5b938a.tar.bz2
rails-3a622d0045771459e6d4cc32307f31f87e5b938a.zip
Fix broken test (closes #10364) [chuyeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/html-scanner/sanitizer_test.rb')
-rw-r--r--actionpack/test/controller/html-scanner/sanitizer_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/test/controller/html-scanner/sanitizer_test.rb b/actionpack/test/controller/html-scanner/sanitizer_test.rb
index 9a7de9ad86..8fe9bbc5e8 100644
--- a/actionpack/test/controller/html-scanner/sanitizer_test.rb
+++ b/actionpack/test/controller/html-scanner/sanitizer_test.rb
@@ -106,7 +106,13 @@ class SanitizerTest < Test::Unit::TestCase
end
def test_should_allow_custom_tags_with_attributes
- text = %(<fieldset foo="bar">foo</fieldset>)
+ text = %(<blockquote cite="http://example.com/">foo</blockquote>)
+ sanitizer = HTML::WhiteListSanitizer.new
+ assert_equal(text, sanitizer.sanitize(text))
+ end
+
+ def test_should_allow_custom_tags_with_custom_attributes
+ text = %(<blockquote foo="bar">Lorem ipsum</blockquote>)
sanitizer = HTML::WhiteListSanitizer.new
assert_equal(text, sanitizer.sanitize(text, :attributes => ['foo']))
end