aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/parser
diff options
context:
space:
mode:
authorGravatar Peter De Wachter <pdewacht@gmail.com>2019-03-02 16:38:02 +0100
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-08-15 21:26:07 -0700
commit3a39d110f0f2a3e976df1e810a861c602a634d14 (patch)
tree5efc55fc9294337ad270cfdaaaff8986d95de6a7 /reader/parser
parent6d39f2a4cb6b00e11defff08dab82ef3a5df5a42 (diff)
Accept HTML entities when parsing XML
Every once in a while, one of my feeds would throw an XML parse error because it used `&nbsp;` or some other HTML entity. I feel Miniflux should be lenient here, and Go already has a handy hook to make this work.
Diffstat (limited to 'reader/parser')
-rw-r--r--reader/parser/format.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/reader/parser/format.go b/reader/parser/format.go
index 87963d3..fef14fe 100644
--- a/reader/parser/format.go
+++ b/reader/parser/format.go
@@ -27,6 +27,7 @@ func DetectFeedFormat(data string) string {
}
decoder := xml.NewDecoder(strings.NewReader(data))
+ decoder.Entity = xml.HTMLEntity
decoder.CharsetReader = encoding.CharsetReader
for {