-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feedLink() is broken, returns invalid data if not found #44
Labels
Comments
@Crell Unfortunately, I can not reproduce the problem. Can your provide an uni test which illustrates the problem? |
Feed entry link is null for below feed source [fox news]
|
It should probably return null for all of Fox News 🤣 Jokes apart, we'd need this as an automated test case, in order for it to be fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Summary
The
getFeedLink()
method is broken and returns invalid data.Current behavior
getFeedLink()
on an RSS feed falls back to theAtom\Feed
extension, and calls it'sgetFeedLink()
method.Atom\Feed::getLink()
first looks for a<link rel="self" />
element to get a link. If it finds nothing, it gets an empty string. So far so good.However, it then calls
absolutiseUrl()
on that value unconditionally, which when passed an empty string dutifully slaps the base domain of the feed onto the start of an empty string, giving you the domain of the site... Which is almost certainly not theself
link of the feed, and may not even be related to the feed in the first place. But that's what then gets returned.How to reproduce
Feed (no pun intended) any RSS feed with no self link into it and call
getFeedLink()
.Expected behavior
According to the method signatures, it should return null if there is no
self
link.The text was updated successfully, but these errors were encountered: