striptagsΒΆ

The striptags filter strips SGML/XML tags and replace adjacent whitespace by one space:

{{ some_html|striptags }}

Note

Internally, Twig uses the PHP strip_tags function.

Previous topic

split

Next topic

title

This Page