aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/rss
diff options
context:
space:
mode:
authorGravatar Tony Wang <wwwjfy@gmail.com>2019-10-23 11:27:27 +0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-10-22 20:32:35 -0700
commit2eb2441f2ba9fcb50d17d8f7deead756187b3586 (patch)
tree523c1dbfe2d87b5ca44cd1d71f79e7ced12bd85c /reader/rss
parent7409bba0d8c8ab74b57cb05cb1571a7e72a7073e (diff)
Improve XML decoder to remove illegal characters
Diffstat (limited to 'reader/rss')
-rw-r--r--reader/rss/parser.go7
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)