joi, 10 septembrie 2015

[OmniFaces utilities 2.0] URL-encode the given string using UTF-8


[OmniFaces utilities] The encodeURL() function URL-encodes the given string using UTF-8. This is useful for cases where you can't use <f:param>.

Function:
See also: Utils#encodeURL()
Usage:

Here it is a simple example of using of:encodeURL() function:

<c:set var="url" value="https://us-mg6.mail.yahoo.com/neo/launch?.rand=dhiv2ate4r8dj#6128537129"/>
#{of:encodeURL(url)}
Output: https%3A%2F%2Fus-mg6.mail.yahoo.com%2Fneo%2Flaunch%3F.rand%3Ddhiv2ate4r8dj%236128537129

Niciun comentariu:

Trimiteți un comentariu