menu

Directory Lister

Directory Lister is the easiest way to share the contents of any web-accessible folder and navigate there within.

Channels
Team

Support simple qote on file's name and url

January 30, 2020 at 10:10pm

Support simple qote on file's name and url

January 30, 2020 at 10:10pm
For example a folder is called "jane's folder" or a file is called "jane's file". The apostrophe is found in the url and makes the application crash.
Maybe you should use the method "str_replace" instead of "trim" to clean the url and generate the folder names. or not, I don't know :)

January 31, 2020 at 3:01am
Thanks for the suggestion , can you be more specific on where in the code we should be using str_replace instead of trim?
  • reply
  • like
In app/src/ViewFunctions/Url.php at line 19: $url = dirname($_SERVER['SCRIPT_NAME']) . '/'.str_replace("'","-",$path) . '/'; But I get a 404 error when I click on the folder.
I'm not expert and not php developper.
Your app, is just amazing! Good job and thank you.
  • reply
  • like
I'm sorry. I just tested and the apostrophe in a folder name works in the url. However, the application crashes when a filename has an apostrophe.
  • reply
  • like

January 31, 2020 at 4:37pm
Thanks, I'll look into this.
  • reply
  • like