mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +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
|
// absolute link
|
||||||
if (ctx.state.data.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
|
// absolute link
|
||||||
if (ctx.state.data.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
|
// referrerpolicy
|
||||||
|
|||||||
Reference in New Issue
Block a user