Encode URI passed as parameter in MB ws request url

This commit is contained in:
Laurent Monin 2015-06-05 16:53:15 +02:00
parent b306925b98
commit 41c5f675cf

View file

@ -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);