diff --git a/lib/mblinks.js b/lib/mblinks.js index 34fbb9b..ccb2e30 100644 --- a/lib/mblinks.js +++ b/lib/mblinks.js @@ -84,8 +84,8 @@ var MBLinks = function (cachekey, expiration) { } else { mblinks.ajax_requests.push($.proxy(function () { var context = this; - $.getJSON('//musicbrainz.org/ws/2/url?resource=' + context.url + '&inc=' + context.mb_type + - '-rels', + $.getJSON('//musicbrainz.org/ws/2/url?resource=' + encodeURIComponent(context.url) + + '&inc=' + context.mb_type + '-rels', function (data) { if ('relations' in data) { var expires = new Date().getTime() + (mblinks.expirationMinutes * 60 * 1000);