client/api: encode spaces (and others) in URLs

This commit is contained in:
rr- 2016-06-22 23:42:57 +02:00
parent 1a75c61f65
commit a6d6aa2f4d

View file

@ -176,7 +176,8 @@ class Api extends events.EventTarget {
} }
_getFullUrl(url) { _getFullUrl(url) {
return (config.apiUrl + '/' + url).replace(/([^:])\/+/g, '$1/'); return (config.apiUrl + '/' + encodeURI(url))
.replace(/([^:])\/+/g, '$1/');
} }
} }