I think it's a common problem, but I haven't found answers for it.
I have a sentence (mixture of HTML, Javascript and JSTL) like this:
<a href='javascrip t:selectItem('$ {item.code}', '${item.alias}' );
${item.alias}
</a>
${item.alias} is a JSTL way to get a String from a parameter
that may contains single or double quotes.
If the string contains single quotes I get an error because the
sentence is not well formed. But if I use double quotes and the
string have double quotes I'll get the same error.
What is the way to solve this issue? Is there any?
I have a sentence (mixture of HTML, Javascript and JSTL) like this:
<a href='javascrip t:selectItem('$ {item.code}', '${item.alias}' );
${item.alias}
</a>
${item.alias} is a JSTL way to get a String from a parameter
that may contains single or double quotes.
If the string contains single quotes I get an error because the
sentence is not well formed. But if I use double quotes and the
string have double quotes I'll get the same error.
What is the way to solve this issue? Is there any?
Comment