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."