i'm using JSTL <c:out>
in my project to support javascript code, i have a string that comes from the servlet like this "2\'000;11\'222;10\'333"
with javascript i'd like to split it to obtain separated values like 2'000;11'222;10'333
....but when i use the <c:out>
tag this "\'"
becames "\'"
messing up the split function....
is there a way to tell JSTL not escape chars ?
stringaCompleta += 'Gennaio;<c:out value="${valori.value}" />';
Simply don't use the c:out
tag at all:
stringaCompleta += 'Gennaio;${valori.value}';
Or use it with escapeXml
set to false (but it's needlessly complex):
stringaCompleta += 'Gennaio;<c:out value="${valori.value}" escapeXml="false" />';
The documentation would have told you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With