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;
* 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;
buf.append('\\');
++i;
}
+ } else if (ch == quote) {
+ // Unescaped quote character
+ err.jspError(start, "jsp.error.attribute.noescape", tx,
+ "" + quote);
} else {
buf.append(ch);
++i;
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'