sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit fc39aa9d24d4481189facf0f6197b0e1795716fa
parent 6bae9a94b97f808e888de1b4633ccb52e7c26c58
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 22 Aug 2015 16:32:55 +0200

sfeed: use <title>, it is required, never use media:title

Diffstat:
Msfeed.c | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sfeed.c b/sfeed.c @@ -41,7 +41,7 @@ enum TagId { RSSTagDescription, RSSTagContentencoded, RSSTagGuid, RSSTagLink, RSSTagDccreator, RSSTagAuthor, /* Atom */ - AtomTagPublished, AtomTagUpdated, AtomTagTitle, AtomTagMediaTitle, + AtomTagPublished, AtomTagUpdated, AtomTagTitle, AtomTagMediaDescription, AtomTagSummary, AtomTagContent, AtomTagId, AtomTagLink, AtomTagAuthor }; @@ -133,7 +133,6 @@ gettag(enum FeedType feedtype, const char *name, size_t namelen) { STRP("id"), AtomTagId }, { STRP("link"), AtomTagLink }, { STRP("media:description"), AtomTagMediaDescription }, - { STRP("media:title"), AtomTagMediaTitle }, { STRP("published"), AtomTagPublished }, { STRP("summary"), AtomTagSummary }, { STRP("title"), AtomTagTitle }, @@ -611,11 +610,8 @@ xml_handler_start_el(XMLParser *p, const char *name, size_t namelen) case RSSTagTitle: ctx.field = &ctx.item.title; break; - case AtomTagMediaTitle: case AtomTagTitle: - /* prefer title over media:title if set */ - if (ctx.tagid != AtomTagMediaTitle || !ctx.item.content.len) - ctx.field = &ctx.item.title; + ctx.field = &ctx.item.title; break; case RSSTagLink: case AtomTagLink: