diff options
author | Tony Wang <wwwjfy@gmail.com> | 2019-10-23 11:27:27 +0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2019-10-22 20:32:35 -0700 |
commit | 2eb2441f2ba9fcb50d17d8f7deead756187b3586 (patch) | |
tree | 523c1dbfe2d87b5ca44cd1d71f79e7ced12bd85c /reader/rss | |
parent | 7409bba0d8c8ab74b57cb05cb1571a7e72a7073e (diff) |
Improve XML decoder to remove illegal characters
Diffstat (limited to 'reader/rss')
-rw-r--r-- | reader/rss/parser.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/reader/rss/parser.go b/reader/rss/parser.go index 79bd144..9ed773d 100644 --- a/reader/rss/parser.go +++ b/reader/rss/parser.go @@ -5,22 +5,17 @@ package rss // import "miniflux.app/reader/rss" import ( - "encoding/xml" "io" "miniflux.app/errors" "miniflux.app/model" - "miniflux.app/reader/encoding" + "miniflux.app/reader/xml" ) // Parse returns a normalized feed struct from a RSS feed. func Parse(data io.Reader) (*model.Feed, *errors.LocalizedError) { feed := new(rssFeed) decoder := xml.NewDecoder(data) - decoder.Entity = xml.HTMLEntity - decoder.Strict = false - decoder.CharsetReader = encoding.CharsetReader - err := decoder.Decode(feed) if err != nil { return nil, errors.NewLocalizedError("Unable to parse RSS feed: %q", err) |