diff --git a/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java b/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java
index 272a4ba4..f19b28d6 100644
--- a/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java
+++ b/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java
@@ -800,6 +800,19 @@ public static final void testLinkRelsWhenRelPresent() {
));
}
+ @Test
+ public static final void testRelLinksWhenRelisPartOfData() {
+ PolicyFactory pf = new HtmlPolicyBuilder()
+ .allowElements("a")
+ .allowAttributes("href").onElements("a")
+ .allowAttributes("rel").onElements("a")
+ .allowAttributes("target").onElements("a")
+ .allowStandardUrlProtocols()
+ .toFactory();
+ String toSanitize = "test";
+ assertTrue("Failure in testRelLinksWhenRelisPartOfData", pf.sanitize(toSanitize).equals(toSanitize));
+ }
+
@Test
public static final void testFailFastOnSpaceSeparatedStrings() {
boolean failed;