@@ -6,7 +6,7 @@ protecting against XSS.
66
77The existing dependencies are on guava and JSR 305. The other jars
88are only needed by the test suite. The JSR 305 dependency is a
9- compile-only dependency, only needed for annotations.
9+ compile-only dependency, only needed for annotations.
1010
1111This code was written with security best practices in mind, has an
1212extensive test suite, and has undergone
@@ -18,7 +18,7 @@ extensive test suite, and has undergone
1818how to get started with or without Maven.
1919
2020You can use
21- [ prepackaged policies] ( https ://rawgit. com/OWASP/ java-html-sanitizer/master/distrib/javadoc /org/owasp/html/Sanitizers.html) :
21+ [ prepackaged policies] ( http ://static.javadoc.io/ com.googlecode.owasp-java-html-sanitizer/owasp- java-html-sanitizer/latest /org/owasp/html/Sanitizers.html) :
2222
2323``` Java
2424PolicyFactory policy = Sanitizers . FORMATTING. and(Sanitizers . LINKS );
@@ -28,7 +28,7 @@ String safeHTML = policy.sanitize(untrustedHTML);
2828or the
2929[ tests] ( https://github.com/OWASP/java-html-sanitizer/blob/master/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java )
3030show how to configure your own
31- [ policy] ( https ://rawgit. com/OWASP/ java-html-sanitizer/master/distrib/javadoc /org/owasp/html/HtmlPolicyBuilder.html) :
31+ [ policy] ( http ://static.javadoc.io/ com.googlecode.owasp-java-html-sanitizer/owasp- java-html-sanitizer/latest /org/owasp/html/HtmlPolicyBuilder.html) :
3232
3333``` Java
3434PolicyFactory policy = new HtmlPolicyBuilder ()
@@ -41,7 +41,7 @@ String safeHTML = policy.sanitize(untrustedHTML);
4141```
4242
4343or you can write
44- [ custom policies] ( https ://rawgit. com/OWASP/ java-html-sanitizer/master/distrib/javadoc /org/owasp/html/ElementPolicy.html)
44+ [ custom policies] ( http ://static.javadoc.io/ com.googlecode.owasp-java-html-sanitizer/owasp- java-html-sanitizer/latest /org/owasp/html/ElementPolicy.html)
4545to do things like changing ` h1 ` s to ` div ` s with a certain class:
4646
4747``` Java
@@ -59,11 +59,11 @@ PolicyFactory policy = new HtmlPolicyBuilder()
5959String safeHTML = policy. sanitize(untrustedHTML);
6060```
6161
62- ```
63- Please note that the elements "a", "font", "img", "input" and "span" need to be explicitly whitelisted
64- using the `allowWithoutAttributes()` method if you want them to be allowed through the filter when
65- these elements do not include any attributes.
66- ```
62+ Please note that the elements "a", "font", "img", "input" and "span"
63+ need to be explicitly whitelisted using the ` allowWithoutAttributes() `
64+ method if you want them to be allowed through the filter when these
65+ elements do not include any attributes.
66+
6767----
6868
6969Subscribe to the
0 commit comments