Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSTL - Cannot use fn:replace to replace double quotes

843840Jul 3 2008 — edited Jul 3 2008
hello,
i'm going mad with this..looked everywhere and got no solution

I'm trying to build a link in a jsp like this:
<span onclick="if( x==y) myJsFunc('${fn:replace(myVar,'\"','')}')">link desc</span>
{code}
where myVar is some string with double quotes in it

the resul is an exception
{code}
javax.el.ELException: Error Parsing: ${fn:replace(myVar,'\"','')} ...
It works fine if i use it to replace single quote (
${fn:replace(myVar,'\'','')
) but not with double quotes :-(

anyone had this problem??
ps: using fn:escapeXml does not work for me in this context.
thanks

Edited by: JoaoBarata on Jul 3, 2008 8:28 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 31 2008
Added on Jul 3 2008
9 comments
5,341 views