From: markt Date: Thu, 25 Mar 2010 22:46:12 +0000 (+0000) Subject: Re-fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45015 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ffe29a144644e12d3e4d39c465340595a832a674;p=tomcat7.0 Re-fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45015 Regression in recent parsing re-factoring git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@927621 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/AttributeParser.java b/java/org/apache/jasper/compiler/AttributeParser.java index c19fac7ba..708c0d654 100644 --- a/java/org/apache/jasper/compiler/AttributeParser.java +++ b/java/org/apache/jasper/compiler/AttributeParser.java @@ -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; diff --git a/java/org/apache/jasper/compiler/Parser.java b/java/org/apache/jasper/compiler/Parser.java index 7cfb2bcdb..a21b1c147 100644 --- a/java/org/apache/jasper/compiler/Parser.java +++ b/java/org/apache/jasper/compiler/Parser.java @@ -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());