summaryrefslogtreecommitdiff
path: root/rss.py
diff options
context:
space:
mode:
Diffstat (limited to 'rss.py')
-rwxr-xr-xrss.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/rss.py b/rss.py
index 2f67723..8625c73 100755
--- a/rss.py
+++ b/rss.py
@@ -66,6 +66,11 @@ class RSSFeed:
content: List[RSSItem]
+def escape(str):
+ str = str.replace("&", "&")
+ return str
+
+
def buildRSS(feed_data: RSSFeed):
"""
feed_data = {
@@ -81,7 +86,7 @@ def buildRSS(feed_data: RSSFeed):
<channel>
<title>{feed_data['title']}</title>
<link>{feed_data['url']}</link>
- <description>{feed_data['description']}</description>
+ <description>{escape(feed_data['description'])}</description>
<lastBuildDate>{_format_date(datetime.now())}</lastBuildDate>"""
for item in feed_data["content"]: