You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2008/06/20 23:34:09 UTC
svn commit: r670074 - in /tomcat/trunk:
java/org/apache/jasper/compiler/Parser.java
webapps/docs/config/systemprops.xml
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