mirror of
https://github.com/miniflux/v2.git
synced 2025-09-30 19:22:11 +00:00
fix(icon): implement better handling of relative icon URLs within a subfolder
This commit is contained in:
parent
8129500296
commit
7ada5d54be
3 changed files with 60 additions and 53 deletions
|
@ -18,7 +18,7 @@ func IsAbsoluteURL(link string) bool {
|
|||
return u.IsAbs()
|
||||
}
|
||||
|
||||
// GetAbsoluteURL return the absolute form of `input` is possible, as well as its parser form.
|
||||
// GetAbsoluteURL returns the absolute form of `input` if possible, as well as its parsed form.
|
||||
func GetAbsoluteURL(input string) (string, *url.URL, error) {
|
||||
if strings.HasPrefix(input, "//") {
|
||||
return "https:" + input, nil, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue