提交 3a622d00 编写于 作者: D David Heinemeier Hansson

Fix broken test (closes #10364) [chuyeow]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 a5fded3e
......@@ -106,7 +106,13 @@ def test_should_allow_only_custom_tags
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册