I'm in a trouble passing EL variable to Javascript with line-breaks.
I have the following calling a Javascript method:
<td>
<a href="#" onclick='javascript:deleteClienteObsItem("${clienteObsListElement.codigo}","<fmt:formatDate pattern="dd/MM/yyyy" value="${clienteObsListElement.dataCRM.time}"/>", "${clienteObsListElement.funcionarioIDCRM.nome}","${clienteObsListElement.eventoCRM}","${clienteObsListElement.andamentoCRM}");' data-reveal-id="modalDeleteClienteObs">
<img src="<c:url value="/resources/Images/Icons/delete.png"/>">
</a>
</td>
What happens: The deleteClienteObsItem()
is not called when the variable contains breaklines.
Edited.
I found a kind of solution: Convert the line-breaks to something them bring it back to line-breaks when I need. But its more like an outline solution than a solution.
Anyone has a real good solution for this?