aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/rss/rss.go
diff options
context:
space:
mode:
Diffstat (limited to 'reader/rss/rss.go')
-rw-r--r--reader/rss/rss.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/reader/rss/rss.go b/reader/rss/rss.go
index fd120cb..172f6f8 100644
--- a/reader/rss/rss.go
+++ b/reader/rss/rss.go
@@ -317,7 +317,12 @@ func (r *rssItem) entryEnclosures() model.EnclosureList {
func (r *rssItem) entryCommentsURL() string {
for _, commentLink := range r.CommentLinks {
if commentLink.XMLName.Space == "" {
- return strings.TrimSpace(commentLink.Data)
+ commentsURL := strings.TrimSpace(commentLink.Data)
+ // The comments URL is supposed to be absolute (some feeds publishes incorrect comments URL)
+ // See https://cyber.harvard.edu/rss/rss.html#ltcommentsgtSubelementOfLtitemgt
+ if url.IsAbsoluteURL(commentsURL) {
+ return commentsURL
+ }
}
}