Skip to content

Commit dd8c6a4

Browse files
committed
Release candidate 20240325.1
1 parent 98c137a commit dd8c6a4

File tree

12 files changed

+47
-22
lines changed

12 files changed

+47
-22
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ how to get started with or without Maven.
3535
## Prepackaged Policies
3636

3737
You can use
38-
[prepackaged policies](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/Sanitizers.html):
38+
[prepackaged policies](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/Sanitizers.html):
3939

4040
```Java
4141
PolicyFactory policy = Sanitizers.FORMATTING.and(Sanitizers.LINKS);
@@ -47,7 +47,7 @@ String safeHTML = policy.sanitize(untrustedHTML);
4747
The
4848
[tests](https://github.com/OWASP/java-html-sanitizer/blob/main/src/test/java/org/owasp/html/HtmlPolicyBuilderTest.java)
4949
show how to configure your own
50-
[policy](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/HtmlPolicyBuilder.html):
50+
[policy](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/HtmlPolicyBuilder.html):
5151

5252
```Java
5353
PolicyFactory policy = new HtmlPolicyBuilder()
@@ -62,7 +62,7 @@ String safeHTML = policy.sanitize(untrustedHTML);
6262
## Custom Policies
6363

6464
You can write
65-
[custom policies](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/ElementPolicy.html)
65+
[custom policies](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/ElementPolicy.html)
6666
to do things like changing `h1`s to `div`s with a certain class:
6767

6868
```Java
@@ -85,7 +85,7 @@ need to be explicitly whitelisted using the `allowWithoutAttributes()`
8585
method if you want them to be allowed through the filter when these
8686
elements do not include any attributes.
8787

88-
[Attribute policies](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/AttributePolicy.html) allow running custom code too. Adding an attribute policy will not water down any default policy like `style` or URL attribute checks.
88+
[Attribute policies](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/AttributePolicy.html) allow running custom code too. Adding an attribute policy will not water down any default policy like `style` or URL attribute checks.
8989

9090
```Java
9191
new HtmlPolicyBuilder = new HtmlPolicyBuilder()
@@ -153,7 +153,7 @@ of the output.
153153

154154
## Telemetry
155155

156-
When a policy rejects an element or attribute it notifies an [HtmlChangeListener](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/HtmlChangeListener.html).
156+
When a policy rejects an element or attribute it notifies an [HtmlChangeListener](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/HtmlChangeListener.html).
157157

158158
You can use this to keep track of policy violation trends and find out when someone
159159
is making an effort to breach your security.

aggregate/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
44
<artifactId>aggregate</artifactId>
55
<packaging>pom</packaging>
6-
<version>20220608.2-SNAPSHOT</version>
6+
<version>20240325.1</version>
77
<parent>
88
<relativePath>..</relativePath>
99
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
1010
<artifactId>parent</artifactId>
11-
<version>20220608.2-SNAPSHOT</version>
11+
<version>20240325.1</version>
1212
</parent>
1313

1414
<modules>

change_log.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# OWASP Java HTML Sanitizer Change Log
22

33
Most recent at top.
4+
* Release 20240325.1
5+
* Remove dependency on Guava
6+
* Raise minimum supported JVM release to 8
7+
* HTML: Avoid duplicate link `rel` values.
8+
* HTML: Recognize foreign content syntactic context: `mathml` / `svg`.
9+
* CSS: Better support for `font-size`, `overflow-wrap`, `word-break`.
10+
* CSS: Better child combinator parsing.
11+
* Bug: Fixed out of bounds when mixing global style attribute with others.
12+
* Special thanks to (in lexicographic order):
13+
Claudio Weiler, Josh England, Prakhar Maurya, Sven Strickroth, subbudvk
414
* Release 20220608.1
515
* Fix bugs in CSS tokenization
616
* Fix deocding of HTML character references that lack semicolons

docs/getting_started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ it to HTML.
2929
The
3030
[javadoc](http://javadoc.io/doc/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/)
3131
covers more detailed topics, including
32-
[customization](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/HtmlPolicyBuilder.html).
32+
[customization](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/HtmlPolicyBuilder.html).
3333

3434
Important classes are:
3535

36-
* [Sanitizers](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/Sanitizers.html) contains combinable pre-packaged policies.
37-
* [HtmlPolicyBuilder](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/HtmlPolicyBuilder.html) lets you easily build custom policies.
36+
* [Sanitizers](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/Sanitizers.html) contains combinable pre-packaged policies.
37+
* [HtmlPolicyBuilder](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/HtmlPolicyBuilder.html) lets you easily build custom policies.
3838

3939
For advanced use, see:
40-
* [AttributePolicy](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/AttributePolicy.html) and [ElementPolicy](http://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20180219.1/org/owasp/html/ElementPolicy.html) allow complex customization.
41-
* [HtmlStreamEventReceiver](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/org/owasp/html/HtmlStreamEventReceiver.html) if you don't just want a `String` as output.
40+
* [AttributePolicy](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/AttributePolicy.html) and [ElementPolicy](http://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20180219.1/org/owasp/html/ElementPolicy.html) allow complex customization.
41+
* [HtmlStreamEventReceiver](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/org/owasp/html/HtmlStreamEventReceiver.html) if you don't just want a `String` as output.
4242

4343
## Asking Questions
4444

docs/maven.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Bigger numbers are more recent and the [change log](../change_log.md)
2323
can shed light on the salient differences.
2424

2525
You should be able to build with the HTML sanitizer. You can read the
26-
[javadoc](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20220608.1/index.html),
26+
[javadoc](https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/20240325.1/index.html),
2727
and if you have questions that aren't answered by these wiki pages,
2828
you can ask on the
2929
[mailing list](http://groups.google.com/group/owasp-java-html-sanitizer-support).

empiricism/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
44
<artifactId>html-types</artifactId>
5-
<version>20220608.2-SNAPSHOT</version>
5+
<version>20240325.1</version>
66
<packaging>jar</packaging>
77
<parent>
88
<relativePath>..</relativePath>
99
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
1010
<artifactId>parent</artifactId>
11-
<version>20220608.2-SNAPSHOT</version>
11+
<version>20240325.1</version>
1212
</parent>
1313

1414
<name>empiricism</name>

html-types/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
44
<artifactId>html-types</artifactId>
5-
<version>20220608.2-SNAPSHOT</version>
5+
<version>20240325.1</version>
66
<packaging>bundle</packaging>
77
<parent>
88
<relativePath>..</relativePath>
99
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
1010
<artifactId>parent</artifactId>
11-
<version>20220608.2-SNAPSHOT</version>
11+
<version>20240325.1</version>
1212
</parent>
1313

1414
<name>OWASP Java HTML Sanitizer Safe HTML Compatibility</name>

java10-shim/pom.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<relativePath>..</relativePath>
77
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
88
<artifactId>parent</artifactId>
9-
<version>20220608.2-SNAPSHOT</version>
9+
<version>20240325.1</version>
1010
</parent>
1111

1212
<name>Java 10 Shim</name>
1313
<description>
1414
Provides an implementation of java8-shim that interoperates with
15-
Java >= 10 idioms for immutable collections.
15+
Java &gt;= 10 idioms for immutable collections.
1616
</description>
1717

1818
<build>
@@ -24,6 +24,13 @@
2424
<release>10</release>
2525
</configuration>
2626
</plugin>
27+
<plugin>
28+
<groupId>org.apache.maven.plugins</groupId>
29+
<artifactId>maven-release-plugin</artifactId>
30+
<configuration>
31+
<arguments>-Dmaven.javadoc.skip=true</arguments> <!-- No public classes -->
32+
</configuration>
33+
</plugin>
2734
</plugins>
2835
</build>
2936

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.owasp.shim;
2+
3+
/**
4+
* This bundle has no useful public classes as it serves only to provide an
5+
* implementation class loaded reflectively. See Java8Shim for details.
6+
*/
7+
public class Notice {
8+
}

java8-shim/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<relativePath>..</relativePath>
77
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
88
<artifactId>parent</artifactId>
9-
<version>20220608.2-SNAPSHOT</version>
9+
<version>20240325.1</version>
1010
</parent>
1111

1212
<name>Java 8 Shim</name>

owasp-java-html-sanitizer/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<relativePath>..</relativePath>
77
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
88
<artifactId>parent</artifactId>
9-
<version>20220608.2-SNAPSHOT</version>
9+
<version>20240325.1</version>
1010
</parent>
1111

1212
<name>OWASP Java HTML Sanitizer</name>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
44
<artifactId>parent</artifactId>
5-
<version>20220608.2-SNAPSHOT</version>
5+
<version>20240325.1</version>
66

77
<packaging>pom</packaging>
88

0 commit comments

Comments
 (0)