org.owasp.html
@ThreadSafe @Immutable public final class PolicyFactory extends java.lang.Object implements com.google.common.base.Function<HtmlStreamEventReceiver,HtmlSanitizer.Policy>
sanitize
method and a and
method to compose
policies.Modifier and Type | Method and Description |
---|---|
PolicyFactory |
and(PolicyFactory f)
Produces a factory that allows the union of the grants, and intersects
policies where they overlap on a particular granted attribute or element
name.
|
HtmlSanitizer.Policy |
apply(HtmlStreamEventReceiver out)
Produces a sanitizer that emits tokens to out.
|
java.lang.String |
sanitize(java.lang.String html)
A convenience function that sanitizes a string of HTML.
|
public HtmlSanitizer.Policy apply(HtmlStreamEventReceiver out)
apply
in interface com.google.common.base.Function<HtmlStreamEventReceiver,HtmlSanitizer.Policy>
public java.lang.String sanitize(@Nullable java.lang.String html)
public PolicyFactory and(PolicyFactory f)
Copyright © 2014 OWASP. All Rights Reserved.