tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r670074 - in /tomcat/trunk: java/org/apache/jasper/compiler/Parser.java webapps/docs/config/systemprops.xml
Date Fri, 20 Jun 2008 21:34:09 GMT
Author: markt
Date: Fri Jun 20 14:34:09 2008
New Revision: 670074

URL: http://svn.apache.org/viewvc?rev=670074&view=rev
Log:
Provide an option to disable the fix for 45015 that raised an error if attributes were not
correctly quoted.

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
    tomcat/trunk/webapps/docs/config/systemprops.xml

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=670074&r1=670073&r2=670074&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Fri Jun 20 14:34:09 2008
@@ -76,6 +76,11 @@
     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 @@
                     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);

Modified: tomcat/trunk/webapps/docs/config/systemprops.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/systemprops.xml?rev=670074&r1=670073&r2=670074&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/trunk/webapps/docs/config/systemprops.xml Fri Jun 20 14:34:09 2008
@@ -76,6 +76,13 @@
       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



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


Mime
View raw message