We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20126
    • 4 Posts
    Hello All,

    I have a very strange problem with content on my site. I first thought this was a Wayfinder bug, but the problem seems to be across the entire site. I originally posted to the Wayfinder forum here - http://modxcms.com/forums/index.php/topic,48686.0.html.

    The is this - if I create a new page for my site, all double slashes (ie, "//") get munged into a single slash (ie, "/"). All existing pages do not exhibit this behavior. That is, if I edit an old page and add "http://foo.bar.com/" to the content, it displays fine, while in a newly created page it gets displayed as "http:/foo.bar.com/".

    Can anyone explain this behavior? I have not seen any bug reports or anything in release notes that sound similar.

    Thanks in advance,

    Dan
      • 20135
      • 188 Posts
      I am working with monarodan on this project, and have just discovered something even more odd about this problem.

      It seems that the 2 forward slashes actually appear, but only when the page is published. When the page is unpublished, only one slash is shown.
        • 25663 MODX Staff
        • 12,272 Posts
        Sounds like magic_quotes is enabled in your PHP install.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 20126
          • 4 Posts
          Hi Ryan,

          I had the same thought initially, however, I don’t see how magic quotes being enabled would cause the behavior seen where slashes are treated differently for old and new (or is it published and unpublished) pages.

          I don’t think magic quotes does anything with forward slashes. Just looked at the docs for it now and it says, "When on, all ’ (single-quote), " (double quote), \ (backslash) and NULL characters are escaped with a backslash automatically. This is identical to what addslashes() does."

          I think we’re going to try a fresh install of 1.0.3 and migrate the site over. Hopefully the problem resolves itself in the process. Unless anyone else has another bright idea??

          Cheers,

          Dan