StripTagsViewHelper extends AbstractViewHelper uses CompileWithContentArgumentAndRenderStatic
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:format.striptags>
Removes tags from the given string (applying PHPs :php:`strip_tags()` function) See https://www.php.net/manual/function.strip-tags.php.
Examples
Default notation
::
<f:format.stripTags>Some Text with Tags and an Ümlaut.</f:format.stripTags>
Some Text with Tags and an Ümlaut. :php:strip_tags()
applied.
.. note:: Encoded entities are not decoded.
Default notation with allowedTags
::
<f:format.stripTags allowedTags="
paragraph Output:: paragraph :: {text -> f:format.stripTags()} Text without tags :php: :: {text -> f:format.stripTags(allowedTags: " Text with p, span, div and script Tags inside, all other tags are removed. To ensure all tags are removed, child node's output must not be escaped No output escaping as some tags may be allowed Initialize ViewHelper arguments Applies strip_tags() on the specified value.Inline notation
strip_tags()
applied.Inline notation with allowedTags
Table of Contents
Properties
Methods
Properties
$escapeChildren
protected
bool
$escapeChildren
= false
$escapeOutput
protected
bool
$escapeOutput
= false
Methods
initializeArguments()
public
initializeArguments() : mixed
Tags
renderStatic()
public
static renderStatic(array<string|int, mixed> $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : string
Parameters
Tags
Return values
string
Search results