Sanitize RSS feed description by removing newline characters

This commit is contained in:
vvzvlad
2025-02-04 20:34:44 +03:00
parent b9df0184a4
commit 49007a0b5e
+1 -1
View File
@@ -120,7 +120,7 @@ async def generate_channel_rss(channel: str, post_parser: Optional[PostParser] =
html_content = post.get('html', '')
text_content = post.get('text', '')
fe.description(f"{text_content}")
fe.description(text_content.replace('\n', ' '))
fe.content(content=html_content, type='CDATA')
pub_date = datetime.fromtimestamp(post['date'], tz=timezone.utc)