From 89aa4ec11ca49cb978bb8e7ac865856da71439d7 Mon Sep 17 00:00:00 2001 From: torusrxxx Date: Thu, 12 Dec 2024 12:20:01 +0800 Subject: [PATCH] Add more ARIA global properties --- src/freenet/client/filter/HTMLFilter.java | 6 +++++- test/freenet/client/filter/ContentFilterTest.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/freenet/client/filter/HTMLFilter.java b/src/freenet/client/filter/HTMLFilter.java index bc5d2ce74e..f4804734c0 100644 --- a/src/freenet/client/filter/HTMLFilter.java +++ b/src/freenet/client/filter/HTMLFilter.java @@ -2120,7 +2120,11 @@ static class TagVerifier { TagVerifier(String tag, String[] allowedAttrs, String[] uriAttrs, String[] inlineURIAttrs, String[] booleanAttrs) { this.tag = tag; - this.allowedAttrs = new HashSet(); + this.allowedAttrs = new HashSet(Arrays.asList("aria-braillelabel", "aria-brailleroledescription", + "aria-describedby", "aria-description", "aria-details", "aria-disabled", "aria-errormessage", + "aria-expanded", "aria-flowto","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-level", + "aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-required", + "aria-roledescription","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext")); this.parsedAttrs = new HashSet(); if (allowedAttrs != null) { for (String allowedAttr: allowedAttrs) diff --git a/test/freenet/client/filter/ContentFilterTest.java b/test/freenet/client/filter/ContentFilterTest.java index b25b13316a..2c92402c88 100644 --- a/test/freenet/client/filter/ContentFilterTest.java +++ b/test/freenet/client/filter/ContentFilterTest.java @@ -432,7 +432,7 @@ public void testLowerCaseExtensions() { } } - private static final String ARIA_ROLE_TEST = ""; + private static final String ARIA_ROLE_TEST = ""; @Test public void testARIAProperties() throws Exception {