We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16879
    • 87 Posts
    Does anyone have a method of automatically re-encoding ampersands within TV values; my client has a need to place affiliate links that contain ampersands and I want to use a strict doctype. I have all the relevant TV’s feeding Ditto and everything is working fine - I just could do with something that will scan the Link TV and replace the ampersands before the page is rendered.
      • 10189
      • 109 Posts
      This is an issue that we are struggling with as well. Only problem for us is that some URLs inside of JavaScript can’t be affected by this, since that will cause certain functions (such as a movie playing) to stop working.

      It’d be nice to isolate a plugin to only run on a TV.
        • 33982 ☆ A M B ☆
        • 476 Posts
        I’ve run into this problem a lot when setting up my eCommerce (Foxy Cart). When someone puts in the "&" in the name of a product, it can mess up my form. I use the following solution which I believe is the same thing you’re running into:

        http://wiki.foxycart.com/integration:modx:phx:rawurlencode

        You’ll need PHx installed for this to work.
          Precision Web Development ... SmashStack.com
          • 10189
          • 109 Posts
          I ended up using a similar solution with PHx (htmlent), but your suggestion is even better! Thanks!

          Gotta love PHx! laugh
            • 33982 ☆ A M B ☆
            • 476 Posts
            Glad it worked. I use PHx all the time...great plugin.
              Precision Web Development ... SmashStack.com