pseudosavant / player.html

One file drop-in media player web app for using video and audio files served using basic HTTP directory listing
MIT License
216 stars 39 forks source link

Problem when folder contains quote in name #17

Closed Nerothos closed 2 years ago

Nerothos commented 2 years ago

Hi,

The page doesn't currently handle folder with quote in name (it truncate what's after the quote, quote included)

pseudosavant commented 2 years ago

Hi @Nerothos, that is interesting. I hadn't run into that yet. Which web server(s) are you using?

Will you please save, and share, copies of your web browser's file browsing pages for the folder, and parent of it, that you have issues with? Like the test examples in this folder? https://github.com/pseudosavant/folder.api/tree/master/server

Nerothos commented 2 years ago

I'm using Apache/2.4.53 Here's a basic test using an image and a folder with similar quote.

test.tar.gz

pseudosavant commented 2 years ago

Thanks @Nerothos, I'll check it out when I work on this project next.

pseudosavant commented 2 years ago

@Nerothos I haven't been able to reproduce this issue using Apache locally with folders that have a quote in them. I checked out your tar file. I don't think I explained what I'm looking for well.

The test examples in https://github.com/pseudosavant/folder.api/tree/master/server are all the result of browsing to a folder on an HTTP server with file browsing enabled and pressing Ctrl-S to save the HTML of the folder/file browsing page. Not the player.html page. It is the HTML that the server renders to list the files.

Here is how to do it:

  1. Go to the folder that has the problematic folder or file name in it (e.g. http://yourserver.com/videos/) image
  2. Press Ctrl-S to save the index.html file of the Apache folder listing
  3. Upload that index.html here

You should end up with a file like this: https://github.com/pseudosavant/folder.api/blob/master/server/apache-std/index.html

pseudosavant commented 2 years ago

That file could still be useful for tests, but I figured out where the issue is. Single quotes needed to be percent encoded for URLs in the folder template. The fix will be in the next release.

pseudosavant commented 2 years ago

@Nerothos Check out v2.2.9 it should fix this.

Nerothos commented 2 years ago

Sorry for not responding, I was busy. I've just tried with that version and it seems to be working ! Thanks.