mod_pubsub_feeds: Copy Atom tags from RSS as-is
authorKim Alvefur <zash@zash.se>
Thu, 04 Feb 2021 16:16:29 -0001
changeset 4431 c402b273f2e3
parent 4430 3fe2c264aac4
child 4432 b328ca621ba6
mod_pubsub_feeds: Copy Atom tags from RSS as-is I've seen some RSS feeds that use Atom elements.
mod_pubsub_feeds/feeds.lib.lua
--- a/mod_pubsub_feeds/feeds.lib.lua	Thu Feb 04 01:12:41 2021 +0100
+++ b/mod_pubsub_feeds/feeds.lib.lua	Thu Feb 04 16:16:29 2021 -0001
@@ -72,6 +72,10 @@
 				translator(feed, tag);
 			end
 		end
+		-- Preserve Atom-namespaced items
+		for atomtag in item:childtags(nil, "http://www.w3.org/2005/Atom") do
+			feed:add_child(st.clone(atomtag));
+		end
 		feed:reset();
 	end
 	return feed;