Hi,
This is probably an easy fix, but I’m currently stumped…
I am using the truncHTML plugin to truncate content whilst retaining HTML. The thing is, I want to retain most of the HTML but to strip out certain tags. For example, I want the truncated text to retain links and strong tags, but I want to remove paragraph tags.
I’ve been using Ingo Wedler’s Strip_HTML plugin, which allows me to remove all HTML tags whilst except the ones I specify. I want to use a combination of these plugins on the same dynamic content, but if I nest one tag pair inside another it’s not happy!
The html_strip code looks like this:
{exp:strip_html keep='b|em|strong|a'}
{article_body}
{/exp:strip_html}The trunchtml code looks like…
{exp:trunchtml chars="440" inline="..." ending="<p class='read_more'><a href=''>Read full article</a></p>"}
{article_body}
{/exp:trunchtml}I was wondering if there was an easy way to process the content with one plugin, assign it to a new variable, then format that variable with the second plugin? Any advice?
(I’m using EE 2.1.3)