2014-06-11 3:18 GMT+04:00 Mark Thomas <ma...@apache.org>: > On 10/06/2014 23:55, Konstantin Kolinko wrote: >> 2014-06-11 2:46 GMT+04:00 <ma...@apache.org>: >>> Author: markt >>> Date: Tue Jun 10 22:46:55 2014 >>> New Revision: 1601787 >>> >>> URL: http://svn.apache.org/r1601787 >>> Log: >>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56612 >>> Correctly parse two consecutive escaped single quotes when used in UEL >>> expression in a JSP. >>> Includes various unit tests that check the parsing of ${'\'\''} >>> >>> Added: >>> tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5nnnn/bug56612.jsp >>> - copied unchanged from r1601785, >>> tomcat/trunk/test/webapp/bug5nnnn/bug56612.jsp >>> Modified: >>> tomcat/tc7.0.x/trunk/ (props changed) >>> tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java >>> tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java >>> tomcat/tc7.0.x/trunk/test/org/apache/el/TestELEvaluation.java >>> tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java >>> tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java >>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml >>> >>> Propchange: tomcat/tc7.0.x/trunk/ >>> ------------------------------------------------------------------------------ >>> Merged /tomcat/trunk:r1601785 >>> >>> Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java >>> URL: >>> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1601787&r1=1601786&r2=1601787&view=diff >>> ============================================================================== >>> --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java >>> (original) >>> +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java Tue >>> Jun 10 22:46:55 2014 >>> @@ -745,7 +745,7 @@ class Parser implements TagConstants { >>> // XXX could move this logic to JspReader >>> last = reader.mark(); // XXX somewhat wasteful >> >> 1. "last" is not advanced in this inner loop, nor it was inside the >> old "if". It is likely a bug. > > I don't see how. It should be correct at the point it is used. >
Ack. I see. (For the record: Those additional "reader.nextChar()" calls are performed only when inside single or double quotes. To break the outer loop one has to read a quote and to read a '}' character. The latter will update the "last" pointer. ) >> 2. If think the "if"s below were supposed to be a chain of "elseif"s. > > Looks like a clean-up that was never back-ported from 8 to 7. If you > want to scratch that itch, go ahead. Understood. I was looking at 6.0.x code at that moment. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org