Author: fhanik
Date: Thu Jun 26 12:52:52 2008
New Revision: 672014
URL: http://svn.apache.org/viewvc?rev=672014&view=rev
Log:
apply patches
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/systemprops.xml
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=672014&r1=672013&r2=672014&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Jun 26 12:52:52 2008
@@ -32,15 +32,6 @@
[ New proposals should be added at the end of the list ]
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45015
- You can't use an unescaped quote if you quote the value with that character
- The second svn commit provides an option to disable the error raised
- by the first.
- http://svn.apache.org/viewvc?rev=657231&view=rev
- http://svn.apache.org/viewvc?rev=670074&view=rev
- +1: markt, remm, fhanik
- -1:
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45212
Map.entrySet() should return entries, not values
http://svn.apache.org/viewvc?rev=668849&view=rev
Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java?rev=672014&r1=672013&r2=672014&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java Thu Jun 26
12:52:52 2008
@@ -75,6 +75,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
*/
@@ -242,7 +247,8 @@
err.jspError(start, "jsp.error.attribute.unterminated", watch);
}
- String ret = parseQuoted(reader.getText(start, stop));
+ String ret = parseQuoted(start, reader.getText(start, stop),
+ watch.charAt(watch.length() - 1));
if (watch.length() == 1) // quote
return ret;
@@ -255,7 +261,8 @@
* QuotedChar ::= ''' | '"' | '\\' | '\"' | "\'" | '\>' | '\$' |
* Char
*/
- private String parseQuoted(String tx) {
+ private String parseQuoted(Mark start, String tx, char quote)
+ throws JasperException {
StringBuffer buf = new StringBuffer();
int size = tx.length();
int i = 0;
@@ -289,6 +296,10 @@
buf.append('\\');
++i;
}
+ } else if (ch == quote && STRICT_QUOTE_ESCAPING) {
+ // Unescaped quote character
+ err.jspError(start, "jsp.error.attribute.noescape", tx,
+ "" + quote);
} else {
buf.append(ch);
++i;
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=672014&r1=672013&r2=672014&view=diff
==============================================================================
---
tomcat/tc6.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties
(original)
+++
tomcat/tc6.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties
Thu Jun 26 12:52:52 2008
@@ -341,6 +341,7 @@
jsp.error.attribute.noequal=equal symbol expected
jsp.error.attribute.noquote=quote symbol expected
jsp.error.attribute.unterminated=attribute for {0} is not properly terminated
+jsp.error.attribute.noescape=Attribute value {0} is quoted with {1} which must
be escaped when used within the value
jsp.error.missing.tagInfo=TagInfo object for {0} is missing from TLD
jsp.error.deferredmethodsignaturewithoutdeferredmethod=Cannot specify a method
signature if 'deferredMethod' is not 'true'
jsp.error.deferredvaluetypewithoutdeferredvalue=Cannot specify a value type if
'deferredValue' is not 'true'
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=672014&r1=672013&r2=672014&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Jun 26 12:52:52 2008
@@ -273,6 +273,10 @@
<subsection name="Jasper">
<changelog>
<fix>
+ <bug>45015</bug>
+ You can't use an unescaped quote if you quote the value with that
character
+ </fix>
+ <fix>
<bug>31257</bug>: Quote endorsed dirs if they contain a space. (markt)
</fix>
<fix>
Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/systemprops.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/systemprops.xml?rev=672014&r1=672013&r2=672014&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/systemprops.xml Thu Jun 26
12:52:52 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]