You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FeedItem.Link can return the incorrect link for Atom feeds where multiple link elements exist for an <entry>.
In the Atom feed below, each <entry> contains multiple <link> tags each points at different things such as a feed for comments on the news item, the next news item, etc. It looks like this:
<link rel="replies" type="application/atom+xml" href="https://www.columbiaspy.com/feeds/2173405820987631614/comments/default" title="Post Comments"/>
<link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8146091995480420252&postID=2173405820987631614&isPopup=true" title="0 Comments"/>
<link rel="edit" type="application/atom+xml" href="https://www.blogger.com/feeds/8146091995480420252/posts/default/2173405820987631614"/>
<link rel="self" type="application/atom+xml" href="https://www.blogger.com/feeds/8146091995480420252/posts/default/2173405820987631614"/>
<link rel="alternate" type="text/html" href="https://www.columbiaspy.com/2022/07/driving-for-drama-benefit-car-show.html" title="DRIVING FOR DRAMA BENEFIT CAR SHOW"/>
FeedItem.Link is set by the BaseFeedItem, which simply grabs the first <link> tag and uses that, which is incorrect. The <link rel="alternate" type="text/html"> tag should be used instead.
I am happy to submit a fix, but it would involve a slight design change. I suggest that BaseFeedItem use abstract properties for Title and Link. That way the individual classes like AtomFeedItem or Rss10FeedItem can implement their own logic to return the appropriate value for those. In this case, AtomFeedItem would use Linq to find the appropriate <link rel="alternate" type="text/html"> link tag.
The text was updated successfully, but these errors were encountered:
acidus99
added a commit
to acidus99/NewsWaffle
that referenced
this issue
Jul 15, 2022
FeedItem.Link can return the incorrect link for Atom feeds where multiple link elements exist for an
<entry>
.In the Atom feed below, each
<entry>
contains multiple<link>
tags each points at different things such as a feed for comments on the news item, the next news item, etc. It looks like this:FeedItem.Link is set by the BaseFeedItem, which simply grabs the first
<link>
tag and uses that, which is incorrect. The<link rel="alternate" type="text/html">
tag should be used instead.atom.xml.txt
I am happy to submit a fix, but it would involve a slight design change. I suggest that
BaseFeedItem
use abstract properties forTitle
andLink
. That way the individual classes likeAtomFeedItem
orRss10FeedItem
can implement their own logic to return the appropriate value for those. In this case,AtomFeedItem
would use Linq to find the appropriate<link rel="alternate" type="text/html">
link tag.The text was updated successfully, but these errors were encountered: