Skip to content

Commit

Permalink
failing test for high-precision CSS values
Browse files Browse the repository at this point in the history
related to #150 and #149
  • Loading branch information
flavorjones committed Oct 28, 2018
1 parent cfa40b9 commit d10e630
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/html5/test_sanitizer.rb
Expand Up @@ -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 = "<span style=\"margin-left:0.3333333334em;\">"
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 = "<span style=\"width:calc(5%)\">"
sane = Nokogiri::HTML(Loofah.scrub_fragment(html, :strip).to_html)
Expand Down

0 comments on commit d10e630

Please sign in to comment.