Ticket #10364: sanitizer_tests_fix.diff
| File sanitizer_tests_fix.diff, 0.8 kB (added by chuyeow, 7 months ago) |
|---|
-
actionpack/test/controller/html-scanner/sanitizer_test.rb
old new 106 106 end 107 107 108 108 def test_should_allow_custom_tags_with_attributes 109 text = %(< fieldset foo="bar">foo</fieldset>)109 text = %(<blockquote cite="http://example.com/">foo</blockquote>) 110 110 sanitizer = HTML::WhiteListSanitizer.new 111 assert_equal(text, sanitizer.sanitize(text)) 112 end 113 114 def test_should_allow_custom_tags_with_custom_attributes 115 text = %(<blockquote foo="bar">Lorem ipsum</blockquote>) 116 sanitizer = HTML::WhiteListSanitizer.new 111 117 assert_equal(text, sanitizer.sanitize(text, :attributes => ['foo'])) 112 118 end 113 119