• Forward slashes being escaped#

  • monarodan Reply #1, 2 years ago

    Reply
    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


  • moniarde Reply #2, 2 years ago

    Reply
    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.


  • rthrash Reply #3, 2 years ago

    Reply
    Sounds like magic_quotes is enabled in your PHP install.


  • monarodan Reply #4, 2 years ago

    Reply
    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