File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 21
21
from os .path import basename
22
22
from datetime import datetime
23
23
from time import mktime
24
- from xml .sax .saxutils import escape
24
+ from xml .sax .saxutils import quoteattr
25
25
26
26
from beets .util import displayable_path
27
27
from beets .dbcore import types
@@ -51,7 +51,7 @@ class Amarok(MetaSource):
51
51
52
52
queryXML = u'<query version="1.0"> \
53
53
<filters> \
54
- <and><include field="filename" value="%s" /></and> \
54
+ <and><include field="filename" value=%s /></and> \
55
55
</filters> \
56
56
</query>'
57
57
@@ -71,7 +71,9 @@ def sync_from_source(self, item):
71
71
# for the patch relative to the mount point. But the full path is part
72
72
# of the result set. So query for the filename and then try to match
73
73
# the correct item from the results we get back
74
- results = self .collection .Query (self .queryXML % escape (basename (path )))
74
+ results = self .collection .Query (
75
+ self .queryXML % quoteattr (basename (path ))
76
+ )
75
77
for result in results :
76
78
if result ['xesam:url' ] != path :
77
79
continue
You can’t perform that action at this time.
0 commit comments