Class SimpleHtmlSanitizer

java.lang.Object
com.google.gwt.safehtml.shared.SimpleHtmlSanitizer
All Implemented Interfaces:
HtmlSanitizer

public final class SimpleHtmlSanitizer extends Object implements HtmlSanitizer
A simple and relatively inexpensive HTML sanitizer.

This sanitizer accepts the subset of HTML consisting of the following attribute-free tags:

  • <b>, <em>, <i>
  • <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
  • <ul>, <ol>, <li>
  • <br>, <hr>, <strong>
as well as numeric HTML entities and HTML entity references. Any HTML metacharacters that do not appear as part of markup in this subset will be HTML-escaped.