Perform an HTML5 level 1 (XML-style) escape operation on a Reader input,
writing results to a Writer.
Level 1 means this method will only escape the five markup-significant characters:
<, >, &, " and '. It is called
XML-style in order to link it with JSP's escapeXml attribute in JSTL's
<c:out ... /> tags.
Note this method may not produce the same results as
#escapeHtml4Xml(Reader,Writer) because
it will escape the apostrophe as ', whereas in HTML 4 such NCR does not exist
(the decimal numeric reference ' is used instead).
This method calls
#escapeHtml(Reader,Writer,HtmlEscapeType,HtmlEscapeLevel) with the following
preconfigured values:
- type:
org.unbescape.html.HtmlEscapeType#HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL
- level:
org.unbescape.html.HtmlEscapeLevel#LEVEL_1_ONLY_MARKUP_SIGNIFICANT
This method is thread-safe.