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}" />';
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}" />';
Share
Improve this question
edited Sep 17, 2012 at 9:26
Medioman92
asked Sep 17, 2012 at 9:00
Medioman92Medioman92
5714 gold badges10 silver badges21 bronze badges
2
- Please show the relevant snippet of your JSP code. – Tomalak Commented Sep 17, 2012 at 9:11
- set attribute xmlOut="true" or xml="true" something like this – user1516873 Commented Sep 17, 2012 at 9:13
1 Answer
Reset to default 17Simply 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.