fix parsing opml with encoding

This commit is contained in:
nkanaev
2022-01-24 13:10:30 +00:00
parent bff7476b58
commit b78c8bf8bf
3 changed files with 52 additions and 0 deletions

View File

@@ -3,6 +3,8 @@ package opml
import (
"encoding/xml"
"io"
"golang.org/x/net/html/charset"
)
type opml struct {
@@ -45,6 +47,7 @@ func Parse(r io.Reader) (Folder, error) {
decoder := xml.NewDecoder(r)
decoder.Entity = xml.HTMLEntity
decoder.Strict = false
decoder.CharsetReader = charset.NewReaderLabel
err := decoder.Decode(&val)
if err != nil {