Summary: | Tomcat escapes all the \% in Template Text as %. | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | zhanglili <zhanglili> |
Component: | Jasper | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | suzuki.yuichiro, wusz |
Priority: | P2 | ||
Version: | 5.5.34 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
zhanglili
2011-12-15 00:35:51 UTC
I agree that this is an issue. The steps to reproduce, 7.0.23: 1. Create test.jsp containing the following line: [[[ \% \\% <\% ]]] 2. Actual result: The page is rendered as [[[ % \% <% ]]] Expected result: [[[ \% \\% <% ]]] I agree that I do not see provisions for escaping single '%' in the JSP Spec. In JSP.1.3.10.1 EBNF Grammar (in JSP 2.2 Spec) defines template text as [[[ TemplateText ::= ( ‘<‘ | ‘${‘ | ‘#{‘ ) | ( TemplateChar* - ( TemplateChar* ( ‘<‘ | ‘${‘ | ‘#{‘ ) ) ) TemplateChar ::= ‘\$’ | ‘\#’ | ‘<\%’ | Char [ vc : QuotedDollarMatched ] ]]] The ‘<\%’ is explicitly mentioned, but not '\%'. Fixed in trunk and 7.0.x and will be included in 7.0.24 onwards. Proposed for 6.0.x and 5.5.x Fixed in 5.5.x and will be included in 5.5.35 onwards. |