Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=36923
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 1 Jan 2009 19:02:21 +0000 (19:02 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 1 Jan 2009 19:02:21 +0000 (19:02 +0000)
If EL is disabled, treat it as template text.

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

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

index 5eb544e..87a29dc 100644 (file)
@@ -1315,7 +1315,7 @@ class Parser implements TagConstants {
             if (ch == '<') {
                 reader.pushChar();
                 break;
-            } else if (ch == '$' || ch == '#') {
+            } else if ((ch == '$' || ch == '#') && !pageInfo.isELIgnored()) {
                 if (!reader.hasMoreInput()) {
                     ttext.write(ch);
                     break;
@@ -1455,9 +1455,9 @@ class Parser implements TagConstants {
             parseXMLScriptlet(parent);
         } else if (reader.matches("<jsp:text")) {
             parseXMLTemplateText(parent);
-        } else if (reader.matches("${")) {
+        } else if (reader.matches("${") && !pageInfo.isELIgnored()) {
             parseELExpression(parent, '$');
-        } else if (reader.matches("#{")) {
+        } else if (reader.matches("#{") && !pageInfo.isELIgnored()) {
             parseELExpression(parent, '#');
         } else if (reader.matches("<jsp:")) {
             parseStandardAction(parent);