jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
419 stars 65 forks source link

File Browser mishandles directories with spaces in them #515

Closed Kriegbaum closed 3 years ago

Kriegbaum commented 3 years ago

myMPD version: 8.0.0

When using the filesystem in the browser, navigating to the album level of my library gives this at the top of the UI: home / Purity Ring / Another Eternity

'Purity Ring' being a selectable item. Clicking on Purity Ring returns this error: Uncaught TypeError: Cannot read property 'images' of undefined (https://10.0.0.55/js/combined.js: 8)

The UI now reads: home / Purity%20Ring

The URL of the page reads: https://10.0.0.55/#/Browse/Filesystem!0/0/-/-/-/Purity%2520Ring

I think when you select the artist directory in this instance, the filepath is getting URL encoded twice, turning the space into %20 and then turning the % in into %25

Doctoring the URL to: https://10.0.0.55/#/Browse/Filesystem!0/0/-/-/-/Purity%20Ring Succesfully lands at the artist directory page

jcorporation commented 3 years ago

Thanks for the bug report, fixed with 92d0186e666f2e1e3d6e97392842f61b1761643e