mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Accept HTML entities when parsing XML
Every once in a while, one of my feeds would throw an XML parse error because it used ` ` or some other HTML entity. I feel Miniflux should be lenient here, and Go already has a handy hook to make this work.
This commit is contained in:
parent
6d39f2a4cb
commit
3a39d110f0
5 changed files with 5 additions and 0 deletions
|
@ -27,6 +27,7 @@ func DetectFeedFormat(data string) string {
|
|||
}
|
||||
|
||||
decoder := xml.NewDecoder(strings.NewReader(data))
|
||||
decoder.Entity = xml.HTMLEntity
|
||||
decoder.CharsetReader = encoding.CharsetReader
|
||||
|
||||
for {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue