We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f3b688 commit c88cb47Copy full SHA for c88cb47
1 file changed
src/test/java/org/owasp/html/StylingPolicyTest.java
@@ -335,6 +335,15 @@ public static final void testImportant() {
335
"color:purple !foo(bar) important");
336
}
337
338
+ @Test
339
+ public static final void testCdoCdc() {
340
+ // No <!-- or --> in output.
341
+ assertSanitizedCss("font-family:'a--' 'b'", "font-family: a--\\>b");
342
+ assertSanitizedCss("font-family:'a' '--b'", "font-family: a<\\!--b");
343
+ assertSanitizedCss("font-family:'a--' 'b'", "font-family: a-->b");
344
+ assertSanitizedCss("font-family:'a b'", "font-family: a<!--b");
345
+ }
346
+
347
private static void assertSanitizedCss(
348
@Nullable String expectedCss, String css) {
349
StylingPolicy stylingPolicy = new StylingPolicy(
0 commit comments