fix(zhihu): a tag without href (#10995)
This commit is contained in:
@@ -14,7 +14,7 @@ module.exports = {
|
||||
|
||||
$('a').each((_, elem) => {
|
||||
const href = $(elem).attr('href');
|
||||
if (href.startsWith('https://link.zhihu.com/?target=')) {
|
||||
if (href?.startsWith('https://link.zhihu.com/?target=')) {
|
||||
const url = new URL(href);
|
||||
const target = url.searchParams.get('target');
|
||||
$(elem).attr('href', decodeURIComponent(target));
|
||||
|
||||
Reference in New Issue
Block a user