Author: markt
Date: Wed Oct 21 20:43:21 2009
New Revision: 828201
URL: http://svn.apache.org/viewvc?rev=828201&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48019
Be more careful to skip over all of nodes we aren't interested it
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=828201&r1=828200&r2=828201&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Wed Oct 21
20:43:21 2009
@@ -1780,11 +1780,21 @@
while (reader.hasMoreInput()) {
start = reader.mark();
if (reader.matches("%--")) {
- parseComment(parent);
+ // Comment
+ reader.skipUntil("--%>");
} else if (reader.matches("%@")) {
parseDirective(parent);
} else if (reader.matches("jsp:directive.")) {
parseXMLDirective(parent);
+ } else if (reader.matches("%!")) {
+ // Declaration
+ reader.skipUntil("%>");
+ } else if (reader.matches("%=")) {
+ // Expression
+ reader.skipUntil("%>");
+ } else if (reader.matches("%")) {
+ // Scriptlet
+ reader.skipUntil("%>");
}
reader.skipUntil("<");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]