We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11793
    • 49 Posts
    I’ve posted a task on Flyspray for this and I’m posting it here because I found nothing anywhere about this issue.

    The file ditto.class.inc.php features this on line 962:
    962: return str_replace("&","&",$url);

    This line of code should not be called if XHTML URLs is set to TRUE in the System Config. This is because makeURL already does this on line 961:
    961: $url = $modx->makeURL(trim($cID), ’’, $queryString);

    That’s how URL ampersands get escaped twice resulting in this effect:
    &

    What effect does this have? Completely busted URLs via Ditto/Reflect.

    The solution would be to perform no entity escaping on URLs outside makeURL.

    My current hack is to comment line 962 out and replace it with this:
    return $url;
      • 18397
      • 3,250 Posts
      1. Flyspray is only used for MODx bugs and not Ditto.
      2. This issue has already been fixed in Ditto 2.1 (see the development download link in my signature) per ticket #62
        • 11793
        • 49 Posts
        That’s great. I’m just frustrated that I couldn’t find any info about this problem on this forum nor on the web in general. That’s also been fixed.