We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50627
    • 2 Posts
    HI!

    I am on MODX Revolution 2.3.3-pl.

    Using this snippet: +content:limit=`200`:striptags:strip:stripString=` `

    Problem: using this snippet causes ampersand to appear in non html entity (& instead of &)

    Example: https://www.dropbox.com/s/z8wwrgen094ekf1/Screenshot%202015-06-17%2023.48.04.png?dl=0
    (first highlight is with limit modifier, second - without)

    Cause: removing :limit=`200` removes the issue

    Is there a problem with my snippet or it is a bug with MODX?

    Alex.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      To begin with, that's really not going to hurt anything. Yes, it's not W3C valid, but it's more a technicality than a practical issue. You can chain the limit output modifier with the htmlentities modifier if you must have it an HTML entity.

      [[element:limit=`200`:htmlentities]]
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 50627
        • 2 Posts
        Actually, it does hurt and a lot. This snippet generates content for RSS feed. As feed is not W3C compliant, search vendors refuse to work with it until it is W3C compliant.

        Htmlentities come from TinyMCE. It is set to encoding mode "raw".