Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

This course is the most refreshing take on teaching design that I've come across.

— Mikaël Sévigny, Developer

strip_tags Modifier

Strip HTML tags from a string, allowing you optionally to pass in a list of tags or a variable name containing the specific tags you want stripped.

html: >
<blockquote><p>"Things we lose have a way of coming back to us in the end,
if not always in the way we expect."</p></blockquote>
 
unwanted: [p, blockquote]
{{ html | strip_tags }}
{{ html | strip_tags('p') }}
{{ html | strip_tags($unwanted) }}
{!! Statamic::modify($html)->stripTags() !!}
{!! Statamic::modify($html)->stripTags('p') !!}
{!! Statamic::modify($html)->stripTags($unwanted) !!}
"Things we lose have a way of coming back to us in the end,
if not always in the way we expect."
 
<blockquote>
"Things we lose have a way of coming back to us in the end,
if not always in the way we expect."
</blockquote>
 
"Things we lose have a way of coming back to us in the end,
if not always in the way we expect."
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →