From edf5c3d6fe5a28a00c0d45c64cab232133438343 Mon Sep 17 00:00:00 2001 From: Dylan Hackworth Date: Thu, 19 Mar 2020 15:27:49 -0500 Subject: [PATCH] #63 patch --- modules/url.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/url.py b/modules/url.py index 9221f34..4e4238e 100644 --- a/modules/url.py +++ b/modules/url.py @@ -118,6 +118,11 @@ class MatrixModule(BotModule): self.logger.error(f"Failed parsing response from url {url}. Error: {e}") return (title, description) + # Issue 63 patch - Title should not contain newlines or tabs + if title is not None: + assert isinstance(title, str) + title = title.replace('\n', '') + title = title.replace('\t', '') return (title, description) async def matrix_message(self, bot, room, event):