diff --git a/lib/loofah/html5/safelist.rb b/lib/loofah/html5/safelist.rb index 583ea8c..1bde02c 100644 --- a/lib/loofah/html5/safelist.rb +++ b/lib/loofah/html5/safelist.rb @@ -638,6 +638,8 @@ module SafeList "green", "groove", "hidden", + "inherit", + "initial", "inset", "italic", "left", @@ -653,16 +655,19 @@ module SafeList "pointer", "purple", "red", + "revert", "ridge", "right", + "separate", "silver", "solid", "teal", - "thin", "thick", + "thin", "top", "transparent", "underline", + "unset", "white", "yellow", ]) diff --git a/test/integration/test_ad_hoc.rb b/test/integration/test_ad_hoc.rb index 5308ecd..356e8d1 100644 --- a/test/integration/test_ad_hoc.rb +++ b/test/integration/test_ad_hoc.rb @@ -287,5 +287,33 @@ def test_dont_remove_whitespace_between_tags assert_equal(expected, actual.to_html) end + + it "allows border-collapse property values" do + # https://github.com/flavorjones/loofah/issues/201 + # https://developer.mozilla.org/en-US/docs/Web/CSS/border-collapse + input = <<~EOF +
+
+
+
+
+
+
+ EOF + + expected = <<~EOF +
+
+
+
+
+
+
+ EOF + + actual = Loofah.scrub_fragment(input, :escape) + + assert_equal(expected, actual.to_html) + end end end