Name
fn:escapeXml
Synopsis
This function
replaces all characters with a special meaning in XML and HTML (i.e.,
< > &
' “) to their corresponding
character entity code (i.e., < > &
' "
) and returns the
resulting string.
Syntax
String: fn:escapeXml(string
)
Parameters
Parameter name |
Java type |
Description |
string |
String |
The string to convert. |
Example
<input name="firstName" value="${fn:escapeXml(param.firstName)}">
Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.