From: markt Date: Wed, 21 Oct 2009 20:43:21 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48019 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ef1102056ddc83406e56ab90bf2aa30f558500cb;p=tomcat7.0 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 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@828201 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/Parser.java b/java/org/apache/jasper/compiler/Parser.java index 10945cf22..b4d9029e9 100644 --- a/java/org/apache/jasper/compiler/Parser.java +++ b/java/org/apache/jasper/compiler/Parser.java @@ -1780,11 +1780,21 @@ class Parser implements TagConstants { 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("<"); }