提交 718d7398 编写于 作者: R Ryuta Kamizono 提交者: Akira Matsuda

Fix `test_should_sanitize_illegal_style_properties` failure

https://travis-ci.org/rails/rails/jobs/279300966#L2600

The result of `Loofah::HTML5::Scrub.scrub_css` was changed since
v2.1.0.rc1.

https://github.com/flavorjones/loofah/commit/ca56295ff9e802018ea18d23ed49be235a95ccad
上级 1dbd24cd
......@@ -18,8 +18,8 @@ def test_sanitize_form
def test_should_sanitize_illegal_style_properties
raw = %(display:block; position:absolute; left:0; top:0; width:100%; height:100%; z-index:1; background-color:black; background-image:url(http://www.ragingplatypus.com/i/cam-full.jpg); background-x:center; background-y:center; background-repeat:repeat;)
expected = %(display: block; width: 100%; height: 100%; background-color: black; background-x: center; background-y: center;)
assert_equal expected, sanitize_css(raw)
expected = %r(\Adisplay:\s?block;\s?width:\s?100%;\s?height:\s?100%;\s?background-color:\s?black;\s?background-x:\s?center;\s?background-y:\s?center;\z)
assert_match expected, sanitize_css(raw)
end
def test_strip_tags
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册