i have a problem with single quotes, sending a word (for ex: patte't) from java to html (freemarker) then use the variable on a "onClick" js function
I have already tried to have an extra escape in java but the variable display will contains '\'(patte\'t). The onClick works fine in this case. If i use a simple escape in java, the variable display is fine but the onClick deosn't work (parameter like: onClick('patte't')), i got an error in this case.
<tr id="contactList" onclick="Ws('${contact.id!''}','${contact.name!''}');">
some <td>
</tr>
contact.name contains a single quote in his value
ex:
Java send: pette't
html displays: pette't
onClick: error(onClick('patte't'))
Thanks everyone