Format.urlencode ViewHelper <f:format.urlencode>

Encodes the given string according to http://www.faqs.org/rfcs/rfc3986.html Applying PHPs rawurlencode() function. See https://www.php.net/manual/function.rawurlencode.php.

Examples

Default notation

<f:format.urlencode>foo @+%/</f:format.urlencode>
Copied!

foo%20%40%2B%25%2F rawurlencode() applied.

Inline notation

{text -> f:format.urlencode()}
Copied!

Url encoded text rawurlencode() applied.

Source code

Go to the source code of this ViewHelper: Format\UrlencodeViewHelper.php (GitHub).

Arguments

The following arguments are available for the format.urlencode ViewHelper:

value

value
Type
string
string to format