diff options
author | Frédéric Guillot <fred@miniflux.net> | 2020-01-04 15:56:00 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2020-01-04 16:07:06 -0800 |
commit | 61f0c8aa6628efe91cb4ebc7e03ec17a0d4eb03d (patch) | |
tree | 7adf64d3f22dc274bd784a20ec2c42b5ef9c82c3 /reader/atom/atom_common.go | |
parent | bf632fad2e19e9ece4db5957f05727f373541917 (diff) |
Allow application/xhtml+xml links as comments URL in Atom replies
Diffstat (limited to 'reader/atom/atom_common.go')
-rw-r--r-- | reader/atom/atom_common.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/reader/atom/atom_common.go b/reader/atom/atom_common.go index 85e6b29..511777b 100644 --- a/reader/atom/atom_common.go +++ b/reader/atom/atom_common.go @@ -57,10 +57,14 @@ func (a atomLinks) firstLinkWithRelation(relation string) string { return "" } -func (a atomLinks) firstLinkWithRelationAndType(relation, contentType string) string { +func (a atomLinks) firstLinkWithRelationAndType(relation string, contentTypes ...string) string { for _, link := range a { - if strings.ToLower(link.Rel) == relation && strings.ToLower(link.Type) == contentType { - return strings.TrimSpace(link.URL) + if strings.ToLower(link.Rel) == relation { + for _, contentType := range contentTypes { + if strings.ToLower(link.Type) == contentType { + return strings.TrimSpace(link.URL) + } + } } } |