This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 46188bfd9c Fix BZ 66536 - tag directives could be ignored for some 
pages
46188bfd9c is described below

commit 46188bfd9c02968a3d1570cf03315ec14b802a89
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Mar 22 17:14:32 2023 +0000

    Fix BZ 66536 - tag directives could be ignored for some pages
    
    https://bz.apache.org/bugzilla/show_bug.cgi?id=66536
---
 java/org/apache/jasper/compiler/ParserController.java | 4 ++--
 webapps/docs/changelog.xml                            | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/ParserController.java 
b/java/org/apache/jasper/compiler/ParserController.java
index 2cba1fbb14..01e2b2a336 100644
--- a/java/org/apache/jasper/compiler/ParserController.java
+++ b/java/org/apache/jasper/compiler/ParserController.java
@@ -453,8 +453,8 @@ class ParserController implements TagConstants {
                 continue;
             }
 
-            // compare for "tag ", so we don't match "taglib"
-            if (jspReader.matches("tag ") || jspReader.matches("page")) {
+            // Want to match tag and page but not taglib
+            if (jspReader.matches("tag") && !jspReader.matches("lib") || 
jspReader.matches("page")) {
 
                 jspReader.skipSpaces();
                 Attributes attrs = Parser.parseAttributes(this, jspReader);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index bc6e5f40b8..db19e925d8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -200,6 +200,10 @@
         <code>LambdaExpression</code> to a functional interface invocation
         failed. (markt)
       </fix>
+      <fix>
+        <bug>66536</bug>: Fix parsing of tag files that meant that tag
+        directives could be ignored for some tag files. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="WebSocket">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to