diff options
author | Frédéric Guillot <fred@miniflux.net> | 2017-11-20 17:12:37 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2017-11-20 17:12:37 -0800 |
commit | aecda64030ef1231244b8b2ab8be0174f6bfd992 (patch) | |
tree | 3eec7b30f7136cd17a891fc0260915caae17eef3 /reader/icon | |
parent | 0e6717b7c86a1761b1ae515dd212a78f1d1e7c8b (diff) |
Make sure XML feeds are always encoded in UTF-8
Diffstat (limited to 'reader/icon')
-rw-r--r-- | reader/icon/finder.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/reader/icon/finder.go b/reader/icon/finder.go index 54d509f..fe6e86d 100644 --- a/reader/icon/finder.go +++ b/reader/icon/finder.go @@ -6,13 +6,14 @@ package icon import ( "fmt" + "io" + "io/ioutil" + "log" + "github.com/miniflux/miniflux2/helper" "github.com/miniflux/miniflux2/model" "github.com/miniflux/miniflux2/reader/http" "github.com/miniflux/miniflux2/reader/url" - "io" - "io/ioutil" - "log" "github.com/PuerkitoBio/goquery" ) @@ -20,7 +21,7 @@ import ( // FindIcon try to find the website's icon. func FindIcon(websiteURL string) (*model.Icon, error) { rootURL := url.GetRootURL(websiteURL) - client := http.NewHttpClient(rootURL) + client := http.NewClient(rootURL) response, err := client.Get() if err != nil { return nil, fmt.Errorf("unable to download website index page: %v", err) @@ -80,7 +81,7 @@ func parseDocument(websiteURL string, data io.Reader) (string, error) { } func downloadIcon(iconURL string) (*model.Icon, error) { - client := http.NewHttpClient(iconURL) + client := http.NewClient(iconURL) response, err := client.Get() if err != nil { return nil, fmt.Errorf("unable to download iconURL: %v", err) |