diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-08-22 16:32:55 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-08-22 16:32:55 +0200 |
commit | fc39aa9d24d4481189facf0f6197b0e1795716fa (patch) | |
tree | afd99590f9ee01e3e780398ac8f99bb09a6d54e4 | |
parent | 6bae9a94b97f808e888de1b4633ccb52e7c26c58 (diff) |
sfeed: use <title>, it is required, never use media:title
-rw-r--r-- | sfeed.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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: |