UrlencodeViewHelper extends AbstractViewHelper uses CompileWithContentArgumentAndRenderStatic

ViewHelper

This class is the implementation of a Fluid ViewHelper.

View this class in the TYPO3 ViewHelper reference: <f:format.urlencode>

Encodes the given string according to http://www.faqs.org/rfcs/rfc3986.html Applying PHPs :php:`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 :php:rawurlencode() applied.

Inline notation

::

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

Url encoded text :php:rawurlencode() applied.

Table of Contents

Properties

$escapeChildren  : bool
Output is escaped already. We must not escape children, to avoid double encoding.

Methods

initializeArguments()  : mixed
Initialize ViewHelper arguments
renderStatic()  : mixed
Escapes special characters with their escaped counterparts as needed using PHPs rawurlencode() function.

Properties

$escapeChildren

Output is escaped already. We must not escape children, to avoid double encoding.

protected bool $escapeChildren = false

Methods

initializeArguments()

Initialize ViewHelper arguments

public initializeArguments() : mixed
Tags
throws
Exception

renderStatic()

Escapes special characters with their escaped counterparts as needed using PHPs rawurlencode() function.

public static renderStatic(array<string|int, mixed> $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : mixed
Parameters
$arguments : array<string|int, mixed>
$renderChildrenClosure : Closure
$renderingContext : RenderingContextInterface
Tags
see
https://www.php.net/manual/function.rawurlencode.php

        
On this page

Search results