aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/atom/atom_10.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2020-01-04 15:56:00 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2020-01-04 16:07:06 -0800
commit61f0c8aa6628efe91cb4ebc7e03ec17a0d4eb03d (patch)
tree7adf64d3f22dc274bd784a20ec2c42b5ef9c82c3 /reader/atom/atom_10.go
parentbf632fad2e19e9ece4db5957f05727f373541917 (diff)
Allow application/xhtml+xml links as comments URL in Atom replies
Diffstat (limited to 'reader/atom/atom_10.go')
-rw-r--r--reader/atom/atom_10.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/reader/atom/atom_10.go b/reader/atom/atom_10.go
index 708cc9f..5323070 100644
--- a/reader/atom/atom_10.go
+++ b/reader/atom/atom_10.go
@@ -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
}