From d10e63065eccdea8e0a9939fe22d3357a6cb1ceb Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sun, 28 Oct 2018 15:23:13 -0400 Subject: [PATCH] failing test for high-precision CSS values related to #150 and #149 --- test/html5/test_sanitizer.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/html5/test_sanitizer.rb b/test/html5/test_sanitizer.rb index 0a3fad96..49c3974c 100755 --- a/test/html5/test_sanitizer.rb +++ b/test/html5/test_sanitizer.rb @@ -275,6 +275,12 @@ def test_css_negative_value_sanitization_shorthand_css_properties assert_match %r/-0.05em/, sane.inner_html end + def test_css_high_precision_value_shorthand_css_properties + html = "" + sane = Nokogiri::HTML(Loofah.scrub_fragment(html, :escape).to_xml) + assert_match %r/0.3333333334em/, sane.inner_html + end + def test_css_function_sanitization_leaves_whitelisted_functions_calc html = "" sane = Nokogiri::HTML(Loofah.scrub_fragment(html, :strip).to_html)