diff --git a/lib/routes/github/trending.js b/lib/routes/github/trending.js index 43f187d7a..90f31def2 100644 --- a/lib/routes/github/trending.js +++ b/lib/routes/github/trending.js @@ -4,7 +4,7 @@ const cheerio = require('cheerio'); module.exports = async (ctx) => { const since = ctx.params.since; const language = ctx.params.language || ''; - const url = `https://github.com/trending/${language}?since=${since}`; + const url = `https://github.com/trending/${encodeURIComponent(language)}?since=${since}`; const response = await got({ method: 'get',