MCPcopy Index your code
hub / github.com/apache/tomcat / parseScriptText

Method parseScriptText

java/org/apache/jasper/compiler/Parser.java:287–304  ·  view source on GitHub ↗
(String tx)

Source from the content-addressed store, hash-verified

285 }
286
287 private String parseScriptText(String tx) {
288 CharArrayWriter cw = new CharArrayWriter();
289 int size = tx.length();
290 int i = 0;
291 while (i < size) {
292 char ch = tx.charAt(i);
293 if (i + 2 < size && ch == '%' && tx.charAt(i + 1) == '\\' && tx.charAt(i + 2) == '>') {
294 cw.write('%');
295 cw.write('>');
296 i += 3;
297 } else {
298 cw.write(ch);
299 ++i;
300 }
301 }
302 cw.close();
303 return cw.toString();
304 }
305
306 /*
307 * Invokes parserController to parse the included page

Callers 6

parseDeclarationMethod · 0.95
parseXMLDeclarationMethod · 0.95
parseExpressionMethod · 0.95
parseXMLExpressionMethod · 0.95
parseScriptletMethod · 0.95
parseXMLScriptletMethod · 0.95

Calls 5

lengthMethod · 0.80
charAtMethod · 0.80
writeMethod · 0.65
closeMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected