From: markt
Date: Fri, 20 Jun 2008 21:34:09 +0000 (+0000)
Subject: Provide an option to disable the fix for 45015 that raised an error if attributes...
X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e366a9d0e5315435bdec88836596919d8641f843;p=tomcat7.0
Provide an option to disable the fix for 45015 that raised an error if attributes were not correctly quoted.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@670074 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/java/org/apache/jasper/compiler/Parser.java b/java/org/apache/jasper/compiler/Parser.java
index 84a05a5ea..a53a36a96 100644
--- a/java/org/apache/jasper/compiler/Parser.java
+++ b/java/org/apache/jasper/compiler/Parser.java
@@ -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);
diff --git a/webapps/docs/config/systemprops.xml b/webapps/docs/config/systemprops.xml
index 10464c9c6..3ac66f88c 100644
--- a/webapps/docs/config/systemprops.xml
+++ b/webapps/docs/config/systemprops.xml
@@ -76,6 +76,13 @@
be used.
+
+ If false 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
+ true will be used.
+
+
If true, any tag buffer that expands beyond
org.apache.jasper.Constants.DEFAULT_TAG_BUFFER_SIZE will be