• In inc.directories.php you don’t seem to be urlencoding the directory names. I have a directory with an ampersand in it and clicking the link just refreshes the page because it’s a bad link.

    I modified line #120 from
    $dlink = str_replace('/', '*', "$dpath");

    to
    $dlink = urlencode(str_replace('/', '*', "$dpath"));

    and the problem is solved.

    https://www.ads-software.com/plugins/file-away/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Matt

    (@syntax53)

    The issue still persists for the path listing just above the table though. Not sure which file that falls into.

    Plugin Author thomstark

    (@thomstark)

    That would be lib/inc/inc.directories-nav.php

    Adding it to line 30 should work:

    $crumbies .= '<a href="'.fileaway_utility::querystring(get_permalink(), $_SERVER["QUERY_STRING"], array("drawer".$drawerid => urlencode($crumblink[$k]))).'">'.$prettycrumb.'</a> / ';

    Thanks for all your troubleshooting on this.

    Thank you, Matt and Thom. This works a treat. Will this mod make an appearance in future updates, or am I going to have to remember to re-apply the changes? I hate remembering stuff.

    Came across this thread when I was having problems with ampersands in directory names and it has helped with all but one problem…

    I am trying to add sub to my shortcode using a directory with an ampersand (i.e. sub=”Health & Safety”) but I just get a blank page returned.

    Can anybody help?

    Thread Starter Matt

    (@syntax53)

    edit: actually nevermind, what i originally just posted wont help you.

    there probably needs to be a “html_entity_decode” somewhere.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘URL Encoding on directory names’ is closed to new replies.