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
Constructors -
Method Summary
-
Constructor Details
-
HtmlEntityEncodingHtmlSanitizer
public HtmlEntityEncodingHtmlSanitizer()
-
-
Method Details
-
sanitize
Description copied from interface:HtmlSanitizerSanitizes a string of HTML.- Specified by:
sanitizein interfaceHtmlSanitizer- Parameters:
html- the String of HTML to Sanitize- Returns:
- a sanitized version of the supplied HTML String.
-