-
Notifications
You must be signed in to change notification settings - Fork 149
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
Spurious empty <summary> elements in atom feed #82
Comments
If you'd like to submit a PR with tests, I'd be happy to review and merge. |
When creating an AtomEntry from an Item, only set Summary if item.Description is non-empty, like we already do for Content. Currently we always emit a <summary> element, even if the item has a non-empty <content> element. Having an empty <summary> in this case may be confusing for feed consumers. The Atom RFC explicitly says that a <summary> is not required in general. (There are a couple special cases where it is required, but they aren't relevant here.) https://tools.ietf.org/html/rfc4287#section-4.1.1.1 Fixes gorilla#82
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
Ping @elithrar would you mind looking at the pull request? |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
still an issue |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
Poke |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
Bump. Happy anniversary. |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
poke |
Preemptively poking this before stalebot gets to it. |
When creating an AtomEntry from an Item, only set Summary if item.Description is non-empty, like we already do for Content. Currently we always emit a `<summary>` element, even if the item has a non-empty `<content>` element. Having an empty `<summary>` in this case may be confusing for feed consumers. The Atom RFC explicitly says that a `<summary>` is not required in general. (There are a couple special cases where it is required, but they aren't relevant here.) https://tools.ietf.org/html/rfc4287#section-4.1.1.1 Fixes #82 Co-authored-by: Corey Daley <cdaley@redhat.com>
When creating an AtomEntry from an Item, only set Summary if item.Description is non-empty, like we already do for Content. Currently we always emit a `<summary>` element, even if the item has a non-empty `<content>` element. Having an empty `<summary>` in this case may be confusing for feed consumers. The Atom RFC explicitly says that a `<summary>` is not required in general. (There are a couple special cases where it is required, but they aren't relevant here.) https://tools.ietf.org/html/rfc4287#section-4.1.1.1 Fixes gorilla#82 Co-authored-by: Corey Daley <cdaley@redhat.com>
I have a feed in which items have a non-empty Content but an empty Description. This should result in an atom feed with a
<content>
element for the item but no<summary>
element, but it seems that the feeds package always emits a<summary>
element, even if it is empty.https://play.golang.org/p/gE3aNOkeIqb
The feeds package should not should not emit a
<summary>
element ifItem.Content
is set butItem.Description
is blank. Its presence may mislead feed readers into displaying the (empty) summary, ignoring the post content.I'm currently working around the issue like this, but would prefer if this wasn't necessary.
Versions
Steps to Reproduce
See code snippet below.
Output:
Expected behavior
Expected output
Code Snippets
https://play.golang.org/p/gE3aNOkeIqb
The text was updated successfully, but these errors were encountered: