On java (controller) I have a string that can contain an apostrophe. I send this string to the jsp page and the string is extracted in this way:
var intestatarioLibString = '${libretto.intestatarioLib};
(I send the object libretto which contains the string).
The problem is the apostrophe, if the string contains an apostrophe, the string is "cut" where the apostrophe is. Sample:
If the string that I send is 'DEL PIERO' ALESSANDRO' , when I open the jsp on browser I met an error because the debugger read like:
var intestatarioLibString = 'DEL PIETRO' ALESSANDRO
So, the apostrophe is considered the end of the string. The problem is that I can't replace the apostrophe, I need it. Can someone can give me a hand please?