From 828f92e37b4140c5a6175cecdeec97e1a2941452 Mon Sep 17 00:00:00 2001 From: Max Sandholm Date: Thu, 21 Sep 2017 14:36:37 +0300 Subject: [PATCH] Fix escaping error --- telematrix/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telematrix/__init__.py b/telematrix/__init__.py index bdb7154..f4e92c3 100644 --- a/telematrix/__init__.py +++ b/telematrix/__init__.py @@ -98,7 +98,7 @@ def format_matrix_msg(form, username, content): :return: The formatted string. """ if 'format' in content and content['format'] == 'org.matrix.custom.html': - re.sub("(.+?)".format(MATRIX_HOST_BARE), "\\2", content['formatted_body']) + re.sub("(.+?)".format(MATRIX_HOST_BARE), "\\2", content['formatted_body']) sanitized = sanitize_html(content['formatted_body']) return html.escape(form).format(username, sanitized), 'HTML' else: