We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44920
    • 48 Posts
    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.]
      MODX Revolution 2.2.8-pl (advanced)

      Extras:
      archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

      PHP Version 5.6.20-0
      MySQL Version 5.5.31