Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45427
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 17 Sep 2008 12:46:45 +0000 (12:46 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 17 Sep 2008 12:46:45 +0000 (12:46 +0000)
Yet another EL bug. Correct paring of quoted stings.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@696278 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/Parser.java

index 9e2780c..b8598a1 100644 (file)
@@ -27,7 +27,6 @@ import javax.servlet.jsp.tagext.TagFileInfo;
 import javax.servlet.jsp.tagext.TagInfo;
 import javax.servlet.jsp.tagext.TagLibraryInfo;
 
-import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
 import org.xml.sax.Attributes;
@@ -786,9 +785,9 @@ class Parser implements TagConstants {
             }
             if (currentChar == -1)
                 err.jspError(start, "jsp.error.unterminated", type + "{");
-            if (currentChar == '"')
+            if (currentChar == '"' && !singleQuoted)
                 doubleQuoted = !doubleQuoted;
-            if (currentChar == '\'')
+            if (currentChar == '\'' && !doubleQuoted)
                 singleQuoted = !singleQuoted;
         } while (currentChar != '}' || (singleQuoted || doubleQuoted));