File tree 2 files changed +16
-0
lines changed 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -662,7 +662,9 @@ module SafeList
662
662
"line-height" ,
663
663
"list-style" ,
664
664
"list-style-type" ,
665
+ "max-height" ,
665
666
"max-width" ,
667
+ "min-height" ,
666
668
"min-width" ,
667
669
"order" ,
668
670
"overflow" ,
Original file line number Diff line number Diff line change @@ -493,13 +493,27 @@ def test_css_function_sanitization_strips_style_attributes_with_unsafe_functions
493
493
assert_match ( %r/<span><\/ span>/ , sane . inner_html )
494
494
end
495
495
496
+ def test_css_max_height
497
+ html = '<div style="max-height: 100%;"></div>'
498
+ sane = Nokogiri ::HTML ( Loofah . scrub_html4_fragment ( html , :escape ) . to_xml )
499
+
500
+ assert_match ( /max-height/ , sane . inner_html )
501
+ end
502
+
496
503
def test_css_max_width
497
504
html = '<div style="max-width: 100%;"></div>'
498
505
sane = Nokogiri ::HTML ( Loofah . scrub_html4_fragment ( html , :escape ) . to_xml )
499
506
500
507
assert_match ( /max-width/ , sane . inner_html )
501
508
end
502
509
510
+ def test_css_min_height
511
+ html = '<div style="min-height: 100%;"></div>'
512
+ sane = Nokogiri ::HTML ( Loofah . scrub_html4_fragment ( html , :escape ) . to_xml )
513
+
514
+ assert_match ( /min-height/ , sane . inner_html )
515
+ end
516
+
503
517
def test_css_min_width
504
518
html = '<div style="min-width: 100%;"></div>'
505
519
sane = Nokogiri ::HTML ( Loofah . scrub_html4_fragment ( html , :escape ) . to_xml )
You can’t perform that action at this time.
0 commit comments