diff --git a/src/utils.js b/src/utils.js index 95c90c5..6037e20 100644 --- a/src/utils.js +++ b/src/utils.js @@ -43,7 +43,7 @@ module.exports.getTileUrls = (req, domains, path, format, publicUrl, aliases) => queryParams.push(`key=${encodeURIComponent(req.query.key)}`); } if (req.query.style) { - queryParams.push(`style=${req.query.style}`); + queryParams.push(`style=${encodeURIComponent(req.query.style)}`); } const query = queryParams.length > 0 ? (`?${queryParams.join('&')}`) : '';