tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1221479 - in /tomcat/tc5.5.x/trunk: STATUS.txt container/webapps/docs/changelog.xml jasper/src/share/org/apache/jasper/compiler/Parser.java
Date Tue, 20 Dec 2011 20:28:50 GMT
Author: markt
Date: Tue Dec 20 20:28:49 2011
New Revision: 1221479

URL: http://svn.apache.org/viewvc?rev=1221479&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52335
Only handle <\% and not \% as escaped in template text.

Modified:
    tomcat/tc5.5.x/trunk/STATUS.txt
    tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
    tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Parser.java

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1221479&r1=1221478&r2=1221479&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Tue Dec 20 20:28:49 2011
@@ -24,12 +24,6 @@ $Id$
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK/OTHER:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52335
-  Only handle <\% and not \% as escaped in template text.
-  http://svn.apache.org/viewvc?rev=1215121&view=rev
-  +1: markt, funkman, jim
-  -1:
-
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 

Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=1221479&r1=1221478&r2=1221479&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Tue Dec 20 20:28:49 2011
@@ -67,6 +67,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        <bug>52335</bug>: Only handle <code>&lt;\%</code> and
not
+        <code>\%</code> as escaped in template text. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Webapps">
     <changelog>
       <fix>

Modified: tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Parser.java
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Parser.java?rev=1221479&r1=1221478&r2=1221479&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Parser.java Tue Dec 20
20:28:49 2011
@@ -1405,6 +1405,7 @@ class Parser implements TagConstants {
         }
 
         while (reader.hasMoreInput()) {
+            int prev = ch;
             ch = reader.nextChar();
             if (ch == '<') {
                 reader.pushChar();
@@ -1430,10 +1431,11 @@ class Parser implements TagConstants {
                     ttext.write('\\');
                     break;
                 }
-                // Look for \% or \$
+                // Look for <\% or \$
                 // Only recognize \$ if isELIgnored is false
                 char next = (char)reader.peekChar();
-                if (next == '%' || (next == '$' && !pageInfo.isELIgnored())) {
+                if ((prev == '<' && next == '%') ||
+                        (next == '$' && !pageInfo.isELIgnored())) {
                     ch = reader.nextChar();
                 }
             }



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


Mime
View raw message