From da3f4af1715d9023d387576049ef0238d557ee67 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 3 Feb 2022 17:43:35 +0200 Subject: [PATCH] Fix newlines in unformatted channel posts --- mautrix_telegram/formatter/from_telegram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mautrix_telegram/formatter/from_telegram.py b/mautrix_telegram/formatter/from_telegram.py index 17272f7e..ccc97ade 100644 --- a/mautrix_telegram/formatter/from_telegram.py +++ b/mautrix_telegram/formatter/from_telegram.py @@ -198,7 +198,7 @@ async def telegram_to_matrix( def force_html(): if not content.formatted_body: content.format = Format.HTML - content.formatted_body = escape(content.body) + content.formatted_body = escape(content.body).replace("\n", "
") if require_html: force_html()