Bug 33407

Summary: \$ is quoted even with el-ignored=true
Product: Tomcat 5 Reporter: John Donald <john.donald>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 5.5.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 40797    

Description John Donald 2005-02-05 01:39:08 UTC
The spec mentions that \$ is only enabled when EL is enabled.

JSP.1.6 Quoting and Escape Conventions
Quoting in Template Text
Only when the EL is enabled for a page (see Section JSP.3.3.2, “Deactivating
EL Evaluation”), a literal $ can be quoted by \$. This is not required but is
useful for quoting EL expressions.

This is currently not the case, as i can see a TODO in the src code.

// TODO: only recognize \$ if isELIgnored is false, but since
// it can be set in a page directive, it cannot be determined
// here.  Argh!

Nevertheless it's a bug i have run into, because my jsps contain many regular 
expressions for javascript where the $ has to be escaped \$, so it's not 
interpreted as end of line in the regex.

John
Comment 1 Yoav Shapira 2005-07-23 00:18:59 UTC
Do you have a suggestion as to how to implement this, given the 2nd part of the
TODO comment in the code?
Comment 2 Mark Thomas 2006-09-11 01:26:23 UTC
This has been fixed in svn and will be included in 5.5.20 onwards.