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

albumart not displayed if file path with "#" character #501

Closed pink-salt closed 3 years ago

pink-salt commented 3 years ago

myMPD version: 7.0.2

If the file path (either folder name or file name) has a "#" character, the album art cannot be displayed.

To Reproduce

For any song file name with a "#" in it, for example, http://192.168.1.32:1333/albumart/samba/AIX/The%20Carl%20Verheyen%20Band%20-%20Rumor%20Mill/1.%20Wildflower%20#2.flac

Expected behavior

The albumart will be broken.

Screenshots

https://www.dropbox.com/s/hq0zl80iav9q1hh/albumart%20error.jpg?dl=0

Server plattform (please complete the following information):

Client plattform (please complete the following information):

If I manually URL encode the "#" character and amend the URL to http://192.168.1.32:1333/albumart/samba/AIX/The%20Carl%20Verheyen%20Band%20-%20Rumor%20Mill/1.%20Wildflower%20%232.flac, it works.

jcorporation commented 3 years ago

The javascript function encodeURI does not encode #. I added my own function wrapper that encodes # to %23. I hope I fixed all occurrences.