Skip to content

Commit 79e1aed

Browse files
authored
Add data to DefaultUrlSanitizer protocols
1 parent f14989b commit 79e1aed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

commonmark/src/main/java/org/commonmark/renderer/html/DefaultUrlSanitizer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
/**
66
*
7-
* Allows http, https and mailto protocols for url.
7+
* Allows http, https, mailto, and data protocols for url.
88
* Also allows protocol relative urls, and relative urls.
99
* Implementation based on https://github.com/OWASP/java-html-sanitizer/blob/f07e44b034a45d94d6fd010279073c38b6933072/src/main/java/org/owasp/html/FilterUrlByProtocolAttributePolicy.java
1010
*/
1111
public class DefaultUrlSanitizer implements UrlSanitizer {
1212
private Set<String> protocols;
1313

1414
public DefaultUrlSanitizer() {
15-
this(List.of("http", "https", "mailto"));
15+
this(List.of("http", "https", "mailto", "data"));
1616
}
1717

1818
public DefaultUrlSanitizer(Collection<String> protocols) {

0 commit comments

Comments
 (0)