I’ve established an ordered list to which I display an RSS feed: e.g.
<ol>
{exp:magpie url="http://chronicle.com/wiredcampus/rss/" limit="3" refresh="720" parse="inward"}
{items}
<li class="newsItem">
<h3><a href="http://{link}">{exp:char_limit total="50"}{title}{/exp:char_limit}</a></h3>
<p>{exp:char_limit total="100"}{description}{/exp:char_limit}<br />
</li><br />
{/items}<br />
{/exp:magpie} <br />
</ol>This all works fine with one little issue.
If feed {description} extends beyond 100 characters, the closing tag included in the feed is eliminated. The simple fix is to add a closing tag after the
...{/exp:char_limit} //as such
The trouble with the above solution is that if the feed description ends up shorter then 100 characters and it includes the closing tag my simple fix causes another unmatched tag validation error by including this extra closing tag.
Has anyone come up with a work around? Some sort of conditional that looks for the tag in the {description} and if not found, writes the closing tag?
I hope this all makes sense.
Thanks