public final class SimpleHtmlSanitizer extends java.lang.Object implements HtmlSanitizer
This sanitizer accepts the subset of HTML consisting of the following attribute-free tags:
|Modifier and Type||Method and Description|
Return a singleton SimpleHtmlSanitizer instance.
Sanitizes a string into
HTML-sanitizes a string.
public static SimpleHtmlSanitizer getInstance()
public static SafeHtml sanitizeHtml(java.lang.String html)
The input string is processed as described above. The result of sanitizing
the string is guaranteed to be safe to use (with respect to XSS
vulnerabilities) in HTML contexts, and is returned as an instance of the
html- the input String
public SafeHtml sanitize(java.lang.String html)