diff --git a/src/feeds/mod.rs b/src/feeds/mod.rs index 9c20599..d58f0f6 100644 --- a/src/feeds/mod.rs +++ b/src/feeds/mod.rs @@ -42,10 +42,17 @@ const ISO8601_DATE: u128 = iso8601::Config::DEFAULT impl Footprint { pub fn into_rss_item(self, root_url: &str) -> Item { + let text = if String::is_empty(&self.text) { + "No description" + } else { + &self.text + }; + // injection, I know let desc = format!( - "{}

---

from {}", - self.text, - page_url(root_url, self.page) + "{}

---

from page {}", + text, + page_url(root_url, self.page), + self.page ); ItemBuilder::default() .title(Some(self.title))