Use internal XML workarounds to detect feed format
This commit is contained in:
parent
6ff617a733
commit
8cebd985a2
1 changed files with 2 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue