Hi,
using ellipsis filter that is by default in Article's template. it goes like this
<p>
[[+introtext:default=`[[+content:ellipsis=`400`]]`]]
<a href="[[~[[+id]]]]" class="readmore">[[%articles.read_more]]</a>
</p>
it work well while there's just textual content. problem is if there are some html tags - usually A or IMG. then it produces output e.g. like this
<p>
<a href="big_image_url"><img class="alignleft size-thumbnail wp-image-1949" title="title" src="img_url" alt="" width="150" height="150" /></a>
some text <a href="other_url"…</a></img>
<a href="blog/2013/05/16/all-on-mobile-enabling-your-enterprise-data/" class="readmore">Read more</a>
</p>
which is apparently wrong - closing '>' is missing. there's also weird and unpaired closing </img> tag.
this behavior can cause wrong "Read more" link or break the page layout in some cases. if there are html tags in content it sometimes adds one more P tag wrapping the excerpt.
wondering have anybody experienced the same or is there any workaround for this? i know there's :notags filter so i can have blog without images but some patch or fix would be more helpful.
thank you in advance
kr
[ed. note: krajicek last edited this post 10 years, 5 months ago.]