Package io.micronaut.http.util
Class HtmlEntityEncodingHtmlSanitizer
java.lang.Object
io.micronaut.http.util.HtmlEntityEncodingHtmlSanitizer
- All Implemented Interfaces:
HtmlSanitizer
@Singleton
@Requires(missingBeans=HtmlSanitizer.class)
public class HtmlEntityEncodingHtmlSanitizer
extends Object
implements HtmlSanitizer
Given an HTML string, it encodes the following characters:
&
to &
, <
to <
, >
to >
, "
to "
, and '
to '
.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
HtmlEntityEncodingHtmlSanitizer
public HtmlEntityEncodingHtmlSanitizer()
-
-
Method Details
-
sanitize
Description copied from interface:HtmlSanitizer
Sanitizes a string of HTML.- Specified by:
sanitize
in interfaceHtmlSanitizer
- Parameters:
html
- the String of HTML to Sanitize- Returns:
- a sanitized version of the supplied HTML String.
-