mirror of
https://github.com/miniflux/v2.git
synced 2025-07-12 16:58:36 +00:00
Add <head> tag to OPML export
This commit is contained in:
parent
47b47cc32c
commit
0f6f4c8c60
4 changed files with 79 additions and 66 deletions
|
@ -14,16 +14,16 @@ import (
|
|||
|
||||
// Parse reads an OPML file and returns a SubcriptionList.
|
||||
func Parse(data io.Reader) (SubcriptionList, *errors.LocalizedError) {
|
||||
feeds := new(opml)
|
||||
opmlDocument := NewOPMLDocument()
|
||||
decoder := xml.NewDecoder(data)
|
||||
decoder.Entity = xml.HTMLEntity
|
||||
decoder.Strict = false
|
||||
decoder.CharsetReader = encoding.CharsetReader
|
||||
|
||||
err := decoder.Decode(feeds)
|
||||
err := decoder.Decode(opmlDocument)
|
||||
if err != nil {
|
||||
return nil, errors.NewLocalizedError("Unable to parse OPML file: %q", err)
|
||||
}
|
||||
|
||||
return feeds.Transform(), nil
|
||||
return opmlDocument.GetSubscriptionList(), nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue