forked from gorilla/feeds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't create an empty <summary> in Atom feeds (gorilla#83)
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>
- Loading branch information
1 parent
4aff1cb
commit 4af5d3a
Showing
2 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters