Hotfix: github search (#1385)

Closes #1383
This commit is contained in:
凉凉
2019-01-14 00:19:25 +08:00
committed by DIYgod
parent 0c02303254
commit 6cbfac4b65

View File

@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
sort = '';
}
const suffix = 'search?o='.concat(order, '&q=', query, '&s=', sort, '&type=Repositories');
const suffix = 'search?o='.concat(order, '&q=', encodeURIComponent(query), '&s=', sort, '&type=Repositories');
const link = url.resolve(host, suffix);
const response = await axios.get(link);
const $ = cheerio.load(response.data);