diff --git a/src/main/java/org/owasp/html/CssSchema.java b/src/main/java/org/owasp/html/CssSchema.java
index 8438628b..d344f23d 100644
--- a/src/main/java/org/owasp/html/CssSchema.java
+++ b/src/main/java/org/owasp/html/CssSchema.java
@@ -383,7 +383,7 @@ Property forKey(String propertyName) {
"bolder", "lighter");
ImmutableSet fontLiterals1 = ImmutableSet.of(
"large", "larger", "small", "smaller", "x-large", "x-small",
- "xx-large", "xx-small");
+ "xx-large", "xx-small", "xxx-large", "medium");
ImmutableSet fontLiterals2 = ImmutableSet.of(
"caption", "icon", "menu", "message-box", "small-caption",
"status-bar");
diff --git a/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java b/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java
index db75e4c7..b399e80d 100644
--- a/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java
+++ b/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java
@@ -994,6 +994,20 @@ public static final void testTextareaIsNotTextArea() {
assertEquals("x", textAreaPolicy.sanitize(input));
}
+ @Test
+ public static final void testCSSFontSize() {
+ HtmlPolicyBuilder builder = new HtmlPolicyBuilder();
+ PolicyFactory factory = builder.allowElements("span")
+ .allowAttributes("style").onElements("span").allowStyling()
+ .toFactory();
+ String toSanitizeXXXLarge = "the large formatting issue with chrome";
+ assertEquals(toSanitizeXXXLarge, factory.sanitize(toSanitizeXXXLarge));
+
+ String toSanitizeMedium = "the medium formatting issue with chrome";
+ assertEquals(toSanitizeMedium, factory.sanitize(toSanitizeMedium));
+ }
+
+
private static String apply(HtmlPolicyBuilder b) {
return apply(b, EXAMPLE);
}