Skip to content
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

Some Atom feeds not populating Link correctly #17

Closed
s3ththompson opened this issue Sep 14, 2015 · 1 comment
Closed

Some Atom feeds not populating Link correctly #17

s3ththompson opened this issue Sep 14, 2015 · 1 comment

Comments

@s3ththompson
Copy link

Based on the spec, atom:link elements with a rel attribute of alternate or a missing rel attribute should be considered as links.

Currently, line 54 in atom.go correctly sets the link for the latter case, but not the former.

if link.Rel == "" {
  next.Link = link.Href
}

should probably be

if link.Rel == "alternate" || link.Rel == "" {
  next.Link = link.Href
}

This small change fixes a few feeds that were parsing incorrectly for me.

@SlyMarbo
Copy link
Owner

Thanks for the bug report and the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants