From aecda64030ef1231244b8b2ab8be0174f6bfd992 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Mon, 20 Nov 2017 17:12:37 -0800 Subject: Make sure XML feeds are always encoded in UTF-8 --- reader/icon/finder.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'reader/icon') 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) -- cgit v1.2.3