Skip to content

Commit

Permalink
Correct "Incomplete URL substring sanitization"
Browse files Browse the repository at this point in the history
  • Loading branch information
dzx-dzx committed Jul 7, 2023
1 parent a10999c commit 2c11904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/v2/sjtu/gs.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = async (ctx) => {
});
const content = cheerio.load(detailResponse.data);

item.description = (item.link.includes('mp.weixin.qq.com/') ? content('#js_content') : content('.page-content')).html();
item.description = (new URL(item.link).hostname === 'mp.weixin.qq.com' ? content('#js_content') : content('.page-content')).html();

return item;
})
Expand Down

0 comments on commit 2c11904

Please sign in to comment.