1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Allow application/xhtml+xml links as comments URL in Atom replies

This commit is contained in:
Frédéric Guillot 2020-01-04 15:56:00 -08:00
parent bf632fad2e
commit 61f0c8aa66
3 changed files with 95 additions and 6 deletions

View file

@ -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)
}
}
}
}