Hi
I have some
<textarea> input that I would like to format for display.
My question is: How can I use fn:replace tag to replace
carriage returns to
so that formatted input looks like exactly as entered in by user?
Doing
string.replaceAll("\r\n|\n","<br/>");
works fine from within a servlet but not if use fn:replace.....This is what I tried
<c:set var="msg" value="${param.message}"/>
${fn:replace(msg, "\\r\\n|\\n", "<br/>")}
This doesn't work...
I have to use
double backslashes in fn:replace - otherwise I get JSTL error.
Can someone tell me what am I doing wrong...
Thanks