diff --git a/src/freenet/client/filter/HTMLFilter.java b/src/freenet/client/filter/HTMLFilter.java index 1372b571cd..62d4612648 100644 --- a/src/freenet/client/filter/HTMLFilter.java +++ b/src/freenet/client/filter/HTMLFilter.java @@ -993,7 +993,9 @@ private static Map getAllowedTagVerifiers() "article", "section", "hgroup", - "wbr"}; + "wbr", + "summary", + "details"}; for (String x: group2) allowedTagsVerifiers.put( x, diff --git a/test/freenet/client/filter/ContentFilterTest.java b/test/freenet/client/filter/ContentFilterTest.java index 9da9cfe250..a680db592e 100644 --- a/test/freenet/client/filter/ContentFilterTest.java +++ b/test/freenet/client/filter/ContentFilterTest.java @@ -113,13 +113,15 @@ public class ContentFilterTest { private static final String SPAN_WITH_STYLE = ""; - private static final String BASE_HREF = ""; - private static final String BAD_BASE_HREF = ""; - private static final String BAD_BASE_HREF2 = ""; - private static final String BAD_BASE_HREF3 = ""; - private static final String BAD_BASE_HREF4 = ""; - private static final String BAD_BASE_HREF5 = ""; - private static final String DELETED_BASE_HREF = ""; + private static final String HTML5_TAGS = "
TLDR
Too Long Didn’t Read
"; + + private static final String BASE_HREF = ""; + private static final String BAD_BASE_HREF = ""; + private static final String BAD_BASE_HREF2 = ""; + private static final String BAD_BASE_HREF3 = ""; + private static final String BAD_BASE_HREF4 = ""; + private static final String BAD_BASE_HREF5 = ""; + private static final String DELETED_BASE_HREF = ""; // From CSS spec @@ -182,7 +184,8 @@ public void testHTMLFilter() throws Exception { assertEquals(CSS_SPEC_EXAMPLE1, htmlFilter(CSS_SPEC_EXAMPLE1)); - assertEquals(SPAN_WITH_STYLE, htmlFilter(SPAN_WITH_STYLE)); + assertEquals(SPAN_WITH_STYLE, HTMLFilter(SPAN_WITH_STYLE)); + assertEquals(HTML5_TAGS, HTMLFilter(HTML5_TAGS)); assertEquals(BASE_HREF, htmlFilter(BASE_HREF)); assertEquals(DELETED_BASE_HREF, htmlFilter(BAD_BASE_HREF));