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:
parent
bf632fad2e
commit
61f0c8aa66
3 changed files with 95 additions and 6 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue