aboutsummaryrefslogtreecommitdiff
path: root/emms-url.el
diff options
context:
space:
mode:
authorTassilo Horn <tassilo@member.fsf.org>2007-01-13 10:49:00 +0000
committerTassilo Horn <tassilo@member.fsf.org>2007-01-13 10:49:00 +0000
commit1e3daf1289c4d23c2b046b212dbf7ea0a567daf3 (patch)
treef36a0877caabe2fac4702fddeb5131679105e1e1 /emms-url.el
parent6ab92fbf3000f8c8c6443e0fa0e43dadda7ef1ae (diff)
fix-ampersands-and-question-marks-in-lastfm.dpatch
Roman Lagunov reported a bug: the last.fm plugin failed scrobbling tracks with & in artist/title/album. The same applies to streams containing an ampersand. So I added ?& and ?? to `emms-url-specials'. But because both are needed to submit values via HTTP GET now you have to `emms-escape-url' only the arguments that may contain special chars instead the complete url, e.g.: (url-retrieve (concat emms-lastfm-server "?hs=true&p=1.1" "&c=" emms-lastfm-client-id "&v=" (number-to-string emms-lastfm-client-version) "&u=" (emms-escape-url emms-lastfm-username)) instead of (url-retrieve (emms-escape-url (concat emms-lastfm-server "?hs=true&p=1.1" "&c=" emms-lastfm-client-id "&v=" (number-to-string emms-lastfm-client-version) "&u=" emms-lastfm-username)) darcs-hash:20070113104902-c06f4-9bf8c040fff6d350a3a7dafcaf2cbf26700d2f04.gz
Diffstat (limited to 'emms-url.el')
-rw-r--r--emms-url.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/emms-url.el b/emms-url.el
index 1889347..3b5ccee 100644
--- a/emms-url.el
+++ b/emms-url.el
@@ -29,7 +29,9 @@
(defvar emms-url-specials
'((?\ . "%20")
- (?\n . "%0D%0A"))
+ (?\n . "%0D%0A")
+ (?& . "%26")
+ (?? . "%3F"))
"*An alist of characters which must be represented specially in URLs.
The transformation is the key of the pair.")