Author: markt
Date: Thu Mar 25 22:46:12 2010
New Revision: 927621

URL: http://svn.apache.org/viewvc?rev=927621&view=rev
Log:
Re-fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45015
Regression in recent parsing re-factoring

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java
    tomcat/trunk/java/org/apache/jasper/compiler/Parser.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java?rev=927621&r1=927620&r2=927621&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java Thu Mar 
25 22:46:12 2010
@@ -122,9 +122,7 @@ public class AttributeParser {
             boolean strict) {
         this.input = input;
         this.quote = quote;
-        // If quote is null this is a scriptign expressions and any EL syntax
-        // should be ignored
-        this.isELIgnored = isELIgnored || (quote == 0);
+        this.isELIgnored = isELIgnored;
         this.isDeferredSyntaxAllowedAsLiteral =
             isDeferredSyntaxAllowedAsLiteral;
         this.strict = strict;

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=927621&r1=927620&r2=927621&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Thu Mar 25 
22:46:12 2010
@@ -244,12 +244,15 @@ class Parser implements TagConstants {
 
         String ret = null;
         try {
-            char quote = 0;
-            if (watch.length() == 1) {
-                quote = watch.charAt(0);
-            }
+            char quote = watch.charAt(watch.length() - 1);
+            
+            // If watch is longer than 1 character this is a scripting
+            // expression and EL is always ignored
+            boolean isElIgnored =
+                pageInfo.isELIgnored() || watch.length() > 1;
+            
             ret = AttributeParser.getUnquoted(reader.getText(start, stop),
-                    quote, pageInfo.isELIgnored(),
+                    quote, isElIgnored,
                     pageInfo.isDeferredSyntaxAllowedAsLiteral());
         } catch (IllegalArgumentException iae) {
             err.jspError(start, iae.getMessage());



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

Reply via email to