MCPcopy Create free account
hub / github.com/apache/tomcat / escapeXml

Method escapeXml

java/org/apache/jasper/tagplugins/jstl/Util.java:205–208  ·  view source on GitHub ↗

Performs the following substring replacements (to facilitate output to XML/HTML pages): & -&gt; &amp < -&gt; &lt; > -&gt; &gt; " -&gt; &#034; ' -&gt; &#039; See als

(String buffer)

Source from the content-addressed store, hash-verified

203 * @return escaped data
204 */
205 public static String escapeXml(String buffer) {
206 String result = escapeXml(buffer.toCharArray(), buffer.length());
207 return Objects.requireNonNullElse(result, buffer);
208 }
209
210 /**
211 * Escapes XML special characters in the given character array buffer.

Callers 1

outputMethod · 0.95

Calls 4

toCharArrayMethod · 0.80
lengthMethod · 0.80
toStringMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected