public <CTX> SafeHtml sanitize(
      @Nullable String html,
      @Nullable HtmlChangeListener<CTX> listener, @Nullable CTX context) {
    if (html == null) { return SafeHtml.EMPTY; }
    return UncheckedConversions.safeHtmlFromStringKnownToSatisfyTypeContract(
        f.sanitize(html, listener, context));
  }
public < CTX > SafeHtml sanitize ( @ Nullable String html , @ Nullable HtmlChangeListener < CTX > listener , @ Nullable CTX context ) { if ( html == null ) { return SafeHtml . EMPTY ; } return UncheckedConversions . safeHtmlFromStringKnownToSatisfyTypeContract ( f . sanitize ( html , listener , context ) ) ; }
A convenience function that sanitizes a string of HTML and reports
the names of rejected element and attributes to listener.
@param html the string of HTML to sanitize.
@param listener if non-null, receives notifications of tags and attributes
that were rejected by the policy.  This may tie into intrusion
detection systems.
@param context if {@code (listener != null)} then the context value passed
with notifications.  This can be used to let the listener know from
which connection or request the questionable HTML was received.
@return a string of safe HTML assuming the input policy factory produces
safe HTML.