striptags not removing  tag? I've seen how you can remove html tags with twig in other posts here so I am using:

&lt;p class="slider--text"&gt;{{ product.intro|striptags('&lt;p&gt;')|raw }}&lt;/p&gt;


To remove the &lt;p&gt; tag that redactor adds automatically. However for some reason it is not removing it. Anyone have any ideas. Have I missed something glaringly obvious?

Cheers
Actually, the striptags filter (which is just a wrapper for the PHP strip_tags function) removes all HTML tags except the ones you pass in.

In other words, if you want to remove &lt;p&gt; tags, just use the striptags filter without any parameters:

{# Will remove all HTML tags #}
&lt;p class="slider--text"&gt;{{ product.intro|striptags|raw }}&lt;/p&gt;


If there are other tags you want to retain, you'll need to pass those in:

{# Will remove all tags except &lt;br&gt; and &lt;img&gt; #}
&lt;p class="slider--text"&gt;{{ product.intro|striptags('&lt;br&gt;&lt;img&gt;')|raw }}&lt;/p&gt;


For a different take on stripping tags, you can use the Retcon plugin (which I wrote). With Retcon, you can remove all &lt;p&gt; tags (and only &lt;p&gt; tags; retaining their contents as well as all other tags) easily by using the retconChange filter:

&lt;p class="slider--text"&gt;{{ product.intro|retconChange('&lt;p&gt;', false) }}&lt;/p&gt;