I need to escape " and \ in jsp, but not necessarily in the same time.
With <c:out var="${value}" /> I can escape " character.
With ${fn:replace(value,'\\','\')} I can escape the \ character, and is working fine.
I tried to handle both cases as follows.
I tried to use
<c:out var="${fn:replace(value,'\\','\')}"/>
but is not working, is not accepted, seems to be an error.
I also tried to put in a variable the string after replace, and after that using it in c:out, but was the same thing.
If anyone has an idea of a way to handle both cases, please let me know.
Note: the input comes from Java, that's why I used \\, and is sent forward as JSON.
Thanks