Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
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.
Note
The output is not escaped. You may have to ensure proper escaping on your own.
Examples
Default notation
<f:format.urlencode>foo @+%/</f:format.urlencode>
foo%20%40%2B%25%2F
rawurlencode
applied.
Inline notation
{text -> f:format.urlencode()}
Url encoded text rawurlencode
applied.
Source code
Go to the source code of this ViewHelper: UrlencodeViewHelper.php (GitHub).
Arguments
The following arguments are available for <f:
:
value
-
- Type
- string
String to format