Skip to content

[plugin] NewsDownloader: add primitive support for relative URLs#12980

Merged
Frenzie merged 2 commits into
koreader:masterfrom
Frenzie:8611-primitive-relative-link-support
Jan 2, 2025
Merged

[plugin] NewsDownloader: add primitive support for relative URLs#12980
Frenzie merged 2 commits into
koreader:masterfrom
Frenzie:8611-primitive-relative-link-support

Conversation

@Frenzie

@Frenzie Frenzie commented Jan 1, 2025

Copy link
Copy Markdown
Member

Fixes #8611.


This change is Reviewable

@Frenzie Frenzie added this to the 2025.01 milestone Jan 1, 2025
local base_url_domain_only = base_url:match("^(.-://[^/]+)/")
return 'href="' .. base_url_domain_only .. link .. '"'
end
if not link:match("^[a-zA-Z][a-zA-Z0-9+.-]*://") then

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Frenzie Frenzie merged commit 016592e into koreader:master Jan 2, 2025
@Frenzie Frenzie deleted the 8611-primitive-relative-link-support branch January 2, 2025 11:45
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relative links broken with news downloader

1 participant