1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +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

@ -194,9 +194,11 @@ func (a *atom10Entry) entryEnclosures() model.EnclosureList {
return enclosures
}
// See https://tools.ietf.org/html/rfc4685#section-3
// See https://tools.ietf.org/html/rfc4685#section-4
// If the type attribute of the atom:link is omitted, its value is assumed to be "application/atom+xml".
// We accept only HTML or XHTML documents for now since the intention is to have the same behavior as RSS.
func (a *atom10Entry) entryCommentsURL() string {
commentsURL := a.Links.firstLinkWithRelationAndType("replies", "text/html")
commentsURL := a.Links.firstLinkWithRelationAndType("replies", "text/html", "application/xhtml+xml")
if url.IsAbsoluteURL(commentsURL) {
return commentsURL
}