Open iamalexei opened 7 months ago
xport.write(' <location>' + escape(path) + '</location>\n')
and escape is
def escape(data, entities={}):
"""Escape &, <, and > in a string of data.
You can escape other strings of data by passing a dictionary as
the optional entities parameter. The keys and values must all be
strings; each key will be replaced with its corresponding value.
"""
# must do ampersand first
data = data.replace("&", "&")
data = data.replace(">", ">")
data = data.replace("<", "<")
if entities:
data = __dict_replace(data, entities)
return data
should urllib.parse.quote urllib.parse.quote(path)
be used instead of escape(path)
?
should urllib.parse.quote
urllib.parse.quote(path)
be used instead ofescape(path)
?
Yeah seems so.
I wanted to fix this issue but I did not understand how to build and test and currently I am on windows.
There's a guide in the github wiki, but it's a little involved.
I wanted to fix this issue but I did not understand how to build and test and currently I am on windows.
@prathamnagpure, I don't know if it's possible on Windows, but on Linux I was able to modify _tmain.py in the already installed Tauon to test your solution. It seems that it works: Tauon creates XSPF playlists with the properly encoded <location>
tag.
The source isn't easily edited in the Windows build as it's bundled into an exe.
This fix looks pretty straightforward though, I'll accept it as a PR.
Tauon Music Box should export XSPF playlists with the
<location>
tag encoded according to the Spec (6.2 Relative paths ):