Provide an option to disable the fix for 45015 that raised an error if attributes...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 20 Jun 2008 21:34:09 +0000 (21:34 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 20 Jun 2008 21:34:09 +0000 (21:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@670074 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/Parser.java
webapps/docs/config/systemprops.xml

index 84a05a5..a53a36a 100644 (file)
@@ -76,6 +76,11 @@ class Parser implements TagConstants {
     private static final String JAVAX_BODY_CONTENT_TEMPLATE_TEXT =
         "JAVAX_BODY_CONTENT_TEMPLATE_TEXT";
 
+    private static final boolean STRICT_QUOTE_ESCAPING = Boolean.valueOf(
+            System.getProperty(
+                    "org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING",
+                    "true")).booleanValue();
+
     /**
      * The constructor
      */
@@ -293,7 +298,7 @@ class Parser implements TagConstants {
                     buf.append('\\');
                     ++i;
                 }
-            } else if (ch == quote) {
+            } else if (ch == quote && STRICT_QUOTE_ESCAPING) {
                 // Unescaped quote character
                 err.jspError(start, "jsp.error.attribute.noescape", tx,
                         "" + quote);
index 10464c9..3ac66f8 100644 (file)
       be used.</p>
     </property>
 
+    <property name="org.apache.jasper.compiler. Parser.STRICT_QUOTE_ESCAPING">
+      <p>If <code>false</code> the requirements for escpaing quotes in JSP
+      attributes will be relaxed so that a missing required quote will not
+      cause an error. If not specified, the specification compliant default of
+      <code>true</code> will be used.</p>
+    </property>
+
     <property name="org.apache.jasper.runtime. BodyContentImpl.LIMIT_BUFFER">
       <p>If <code>true</code>, any tag buffer that expands beyond
       <code>org.apache.jasper.Constants.DEFAULT_TAG_BUFFER_SIZE</code> will be