Skip to content

Commit

Permalink
Fix : Test related to global stylinh
Browse files Browse the repository at this point in the history
  • Loading branch information
subbudvk authored Apr 11, 2024
1 parent 741ed90 commit cf0fa25
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -541,17 +541,6 @@ public static final void testOptionAllowsText() {
pf.sanitize(input)
);
}

@Test
public static final void testStyleGlobally() {
PolicyFactory policyBuilder = new HtmlPolicyBuilder()
.allowAttributes("style").globally()
.allowElements("a", "label", "h1", "h2", "h3", "h4", "h5", "h6")
.toFactory();
String input = "<h1 style=\"color:green ;name:user ;\">This is some green text</h1>";
String want = "<h1 style=\"color:green\">This is some green text</h1>";
assertEquals(want, policyBuilder.sanitize(input));
}

static int fac(int n) {
int ifac = 1;
Expand Down

0 comments on commit cf0fa25

Please sign in to comment.