T - The type of context value passed to thepublic final class HtmlChangeReporter<T>
extends java.lang.Object
HtmlChangeListener.
HtmlChangeReporter<T> hcr = new HtmlChangeReporter<T>( renderer, htmlChangeListener, context); hcr.setPolicy(policyFactory.apply(hcr.getWrappedRenderer())); HtmlSanitizer.sanitize(html, hcr.getWrappedPolicy());The renderer receives events from the policy unchanged, but the reporter notices differences between the events from the lexer and those from the policy.
| Constructor | Description |
|---|---|
HtmlChangeReporter(HtmlStreamEventReceiver renderer,
HtmlChangeListener<? super T> listener,
T context) |
| Modifier and Type | Method | Description |
|---|---|---|
HtmlSanitizer.Policy |
getWrappedPolicy() |
The underlying policy.
|
HtmlStreamEventReceiver |
getWrappedRenderer() |
The underlying renderer.
|
void |
setPolicy(HtmlSanitizer.Policy policy) |
Associates an input channel.
|
public HtmlChangeReporter(HtmlStreamEventReceiver renderer, HtmlChangeListener<? super T> listener, @Nullable T context)
context - forwarded to listener along with any reports.public void setPolicy(HtmlSanitizer.Policy policy)
this receives events and forwards
them to input.public HtmlStreamEventReceiver getWrappedRenderer()
public HtmlSanitizer.Policy getWrappedPolicy()
Copyright © 2019 OWASP. All rights reserved.