mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-06 05:03:44 +08:00
feat: use item link as absolute link base
This commit is contained in:
@@ -46,7 +46,7 @@ module.exports = async (ctx, next) => {
|
||||
|
||||
// absolute link
|
||||
if (ctx.state.data.link) {
|
||||
$ele.attr('href', new URL($ele.attr('href'), ctx.state.data.link).href);
|
||||
$ele.attr('href', new URL($ele.attr('href'), item.link || ctx.state.data.link).href);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -66,7 +66,7 @@ module.exports = async (ctx, next) => {
|
||||
|
||||
// absolute link
|
||||
if (ctx.state.data.link) {
|
||||
$ele.attr('src', new URL($ele.attr('src'), ctx.state.data.link).href);
|
||||
$ele.attr('src', new URL($ele.attr('src'), item.link || ctx.state.data.link).href);
|
||||
}
|
||||
|
||||
// referrerpolicy
|
||||
|
||||
Reference in New Issue
Block a user