mod_pubsub_summary/mod_pubsub_summary.lua
changeset 5139 35085e0d52ad
parent 5135 82e7251d4f52
--- a/mod_pubsub_summary/mod_pubsub_summary.lua	Sun Jan 08 17:54:11 2023 +0100
+++ b/mod_pubsub_summary/mod_pubsub_summary.lua	Tue Jan 10 16:05:01 2023 +0100
@@ -4,6 +4,7 @@
 module:hook("pubsub-summary/http://www.w3.org/2005/Atom", function (event)
 	local payload = event.payload;
 	local title = payload:get_child_text("title");
+	if title then title = title:gsub("^%s+", ""):gsub("%s+$", ""); end
 	-- Note: This prefers content over summary, it was made for a news feed where
 	-- the interesting stuff was in the content and the summary was .. meh.
 	local content_tag = payload:get_child("content") or payload:get_child("summary");