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

Method getExprInXml

java/org/apache/jasper/compiler/JspUtil.java:74–85  ·  view source on GitHub ↗

Takes a potential expression and converts it into XML form. @param expression The expression to convert @return XML view

(String expression)

Source from the content-addressed store, hash-verified

72 * @return XML view
73 */
74 public static String getExprInXml(String expression) {
75 String returnString;
76 int length = expression.length();
77
78 if (expression.startsWith(OPEN_EXPR) && expression.endsWith(CLOSE_EXPR)) {
79 returnString = expression.substring(1, length - 1);
80 } else {
81 returnString = expression;
82 }
83
84 return Escape.xml(returnString);
85 }
86
87 /**
88 * Checks to see if the given scope is valid.

Callers 2

appendPageDirectiveMethod · 0.95
printAttributesMethod · 0.95

Calls 4

xmlMethod · 0.95
lengthMethod · 0.80
endsWithMethod · 0.80
startsWithMethod · 0.45

Tested by

no test coverage detected