Merge pull request #64 from dhghf/#63-patch

Fixes #63
This commit is contained in:
Ville Ranki 2020-03-20 10:43:44 +02:00 committed by GitHub
commit b7bda46261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -118,6 +118,11 @@ class MatrixModule(BotModule):
self.logger.error(f"Failed parsing response from url {url}. Error: {e}") self.logger.error(f"Failed parsing response from url {url}. Error: {e}")
return (title, description) 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) return (title, description)
async def matrix_message(self, bot, room, event): async def matrix_message(self, bot, room, event):