Fix newlines in unformatted messages going through relaybot. Fixes #306

This commit is contained in:
Tulir Asokan
2019-04-03 15:31:59 +03:00
parent e1ac4233c7
commit 80d90f93cd
+1 -1
View File
@@ -899,7 +899,7 @@ class Portal:
) -> None:
if "formatted_body" not in message:
message["format"] = "org.matrix.custom.html"
message["formatted_body"] = escape_html(message.get("body", ""))
message["formatted_body"] = escape_html(message.get("body", "")).replace("\n", "<br/>")
body = message["formatted_body"]
tpl = (self.get_config(f"message_formats.[{msgtype}]")