diff 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
parents 649f733aa3dc
children b328ca621ba6
line wrap: on
line diff
--- 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;