format.stripTags¶
Removes tags from the given string (applying PHPs strip_tags()
function)
See https://www.php.net/manual/function.strip-tags.php.
Examples¶
Default notation¶
<f:format.stripTags>Some Text with <b>Tags</b> and an Ümlaut.</f:format.stripTags>
Some Text with Tags and an Ümlaut. strip_tags()
applied.
Note
Encoded entities are not decoded.
Default notation with allowedTags¶
<f:format.stripTags allowedTags="<p><span><div><script>">
<p>paragraph</p><span>span</span><div>divider</div><iframe>iframe</iframe><script>script</script>
</f:format.stripTags>
Output:
<p>paragraph</p><span>span</span><div>divider</div>iframe<script>script</script>
Inline notation with allowedTags¶
{text -> f:format.stripTags(allowedTags: "<p><span><div><script>")}
Text with p, span, div and script Tags inside, all other tags are removed.