@ThreadSafe @Immutable public final class PolicyFactory extends 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.
|
String |
sanitize(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 String sanitize(@Nullable String html)
public PolicyFactory and(PolicyFactory f)
Copyright © 2016 OWASP. All rights reserved.