Skip to content

Commit e4eff4f

Browse files
committed
documented
1 parent 778d5c2 commit e4eff4f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/main/java/org/owasp/html/HtmlChangeListener.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@
3434
* Receives events when an HTML tag, or attribute is discarded.
3535
* This can be hooked into an intrusion detection system to alert code when
3636
* suspicious HTML passes through the sanitizer.
37+
* <p>
38+
* Note: If a string sanitizes with no change notifications, it is not the case
39+
* that the input string is necessarily safe to use.
40+
* Only use the output of the sanitizer.
41+
* The sanitizer ensures that the output is in a sub-set of HTML that commonly
42+
* used HTML parsers will agree on the meaning of, but the absence of
43+
* notifications does not mean that the input is in such a sub-set,
44+
* only that it does not contain structural features that were removed.
45+
* </p>
3746
*/
3847
public interface HtmlChangeListener<T> {
3948

src/main/java/org/owasp/html/HtmlChangeReporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import javax.annotation.Nullable;
3636

3737
/**
38-
* Sits between the HTML parser, and then policy, and the renderer so that it
38+
* Sits between the HTML parser, the policy, and the renderer so that it
3939
* can report dropped elements and attributes to an {@link HtmlChangeListener}.
4040
*
4141
* <pre>

0 commit comments

Comments
 (0)