Comparison

mod_pubsub_feeds/feeds.lib.lua @ 4427:c402b273f2e3

mod_pubsub_feeds: Copy Atom tags from RSS as-is I've seen some RSS feeds that use Atom elements.
author Kim Alvefur <zash@zash.se>
date Thu, 04 Feb 2021 16:16:29 -0001
parent 2378:649f733aa3dc
child 4428:b328ca621ba6
comparison
equal deleted inserted replaced
4426:3fe2c264aac4 4427:c402b273f2e3
70 local translator = rss2atom[tag.name]; 70 local translator = rss2atom[tag.name];
71 if translator then 71 if translator then
72 translator(feed, tag); 72 translator(feed, tag);
73 end 73 end
74 end 74 end
75 -- Preserve Atom-namespaced items
76 for atomtag in item:childtags(nil, "http://www.w3.org/2005/Atom") do
77 feed:add_child(st.clone(atomtag));
78 end
75 feed:reset(); 79 feed:reset();
76 end 80 end
77 return feed; 81 return feed;
78 end 82 end
79 83