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
Do you have a suggestion as to how to implement this, given the 2nd part of the TODO comment in the code?
This has been fixed in svn and will be included in 5.5.20 onwards.