diff options
author | Kebin Liu <lkebin@gmail.com> | 2020-01-03 14:19:15 +0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2020-01-02 22:19:15 -0800 |
commit | 8cebd985a267f6fbcc363672ca81780dd5407eff (patch) | |
tree | 28b0d65b9a64f1c468bcf2fbc22de294b9f95505 | |
parent | 6ff617a73374c77a0356d0418b558eecf566f4c5 (diff) |
Use internal XML workarounds to detect feed format
-rw-r--r-- | reader/parser/format.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/reader/parser/format.go b/reader/parser/format.go index fef14fe..c85dd15 100644 --- a/reader/parser/format.go +++ b/reader/parser/format.go @@ -8,7 +8,7 @@ import ( "encoding/xml" "strings" - "miniflux.app/reader/encoding" + rxml "miniflux.app/reader/xml" ) // List of feed formats. @@ -26,9 +26,7 @@ func DetectFeedFormat(data string) string { return FormatJSON } - decoder := xml.NewDecoder(strings.NewReader(data)) - decoder.Entity = xml.HTMLEntity - decoder.CharsetReader = encoding.CharsetReader + decoder := rxml.NewDecoder(strings.NewReader(data)) for { token, _ := decoder.Token() |