Skip to content
Snippets Groups Projects
Commit df455741 authored by Dandy Umlauft's avatar Dandy Umlauft Committed by Jigal van Hemert
Browse files

[TASK] Updated Examples for Usage

Added default and inline usage for the optional attribute "allowedTags"

Maybe you have to think about the name, cause in
http://php.net/manual/de/function.strip-tags.php the second parameter is
called "allowableTags", and not "allowedTags" This can lead to a quick
overlooked error ;)

Releases: master
Resolves: #82912
Change-Id: Icc3cab9a931790e621f5593ea487c9b23b779e30
Reviewed-on: https://review.typo3.org/54546


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: default avatarJigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: default avatarJigal van Hemert <jigal.van.hemert@typo3.org>
parent 6885e191
Branches
Tags
No related merge requests found
......@@ -32,6 +32,13 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithContentArgumentAndRenderS
* Some Text with Tags and an &Uuml;mlaut. (strip_tags() applied. Note: encoded entities are not decoded)
* </output>
*
* <code title="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>
* </code>
* <output>
* <p>paragraph</p><span>span</span><div>divider</div>iframe<script>script</script>
* </output>
*
* <code title="inline notation">
* {text -> f:format.stripTags()}
* </code>
......@@ -39,6 +46,13 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithContentArgumentAndRenderS
* Text without tags (strip_tags() applied)
* </output>
*
* <code title="inline notation with allowedTags">
* {text -> f:format.stripTags(allowedTags: "<p><span><div><script>")}
* </code>
* <output>
* Text with p, span, div and script Tags inside, all other tags are removed
* </output>
*
* @api
*/
class StripTagsViewHelper extends AbstractViewHelper
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment