My string is a HTML code which contains single quotation and I want replace this with a escape and a single quotation.
Example
Input: <p style='padding-left:30px;'>
Output: <p style=\'padding-left:30px;'>
I try this and tried escape single quotation (like '\''
but doesn't works):
<c:set var="htmlEvento" value="${fn:replace(filial.eventos, ''', '\\'')}"/>
Error
Caused by: org.apache.jasper.JasperException: /loja/FilialLojaList.jsp (line: 125, column: 11) "${fn:replace(filial.eventos, ''', '\'')}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${fn:replace(filial.eventos, ''', '\'')}]