We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42095
    • 5 Posts
    My content has a mix of formatting, and it is driving me nuts getting clean RSS test...

    <title>[[+pagetitle:notags:htmlent]]</title> yields: <title>ALM – What is it and Why Do I Care?</title>
    <title>[[+pagetitle:notags]]</title> yields: <title>ALM & an expanded approach to being Test Driven (Part 2)</title>

    So, without making ANY assumptions about what is in pagetitle, how can I get a robust valid RSS rendering?!?!?!?


      • 27708 MODX Staff
      • 2,502 Posts
      Are you attempting to ensure the RSS feed will validate and not kill some RSS parsers? You could use the :cdata output filter if you really need to be sure:

      I use this on modx.com for our RSS feed item on the blog:
      <title>[[+pagetitle:cdata]]</title>
      which yields
      <title><![CDATA[MODXpo: Spectacular Speakers & Friday Social]]></title>
      and therefore validates and is correctly parsed. Hope this helps. BTW this will probably only if you are delivering UTF8. If your site is using another charset you will likely need to use :htmlent to be sure they are converted.

      Hope this helps.

      Jay
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 42095
        • 5 Posts
        Jay,

        Thanks - I will give that a try. Out of desparation, I tweaked the titles of postings manually to get past the issue on the production server, and the dev server is currently in an upgrade, so I will not get a chance to test until Monday..

        David