From 1e3daf1289c4d23c2b046b212dbf7ea0a567daf3 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Sat, 13 Jan 2007 10:49:00 +0000 Subject: 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 --- emms-url.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'emms-url.el') 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.") -- cgit v1.2.3