Wrap RSS feed description in CDATA section for proper HTML escaping

This commit is contained in:
vvzvlad
2025-02-02 03:59:14 +03:00
parent 2a6470462d
commit 172100f821
+1 -1
View File
@@ -152,7 +152,7 @@ async def get_rss_feed(channel: str):
fe.title(post['title'])
fe.link(href=f"https://t.me/{channel}/{post['id']}")
fe.pubDate(post['date'].astimezone(tz=None))
fe.description(post['html'])
fe.description(f"<![CDATA[{post['html']}]]>")
fe.content(content=post['html'], type='CDATA')
# Add media enclosures