aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/html-scanner/sanitizer_test.rb
diff options
context:
space:
mode:
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