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):