From d07b80960bde990f0ad8fa9ad6347e7646ee45d8 Mon Sep 17 00:00:00 2001 From: Joan Cano Date: Thu, 2 Mar 2023 12:04:27 +0100 Subject: [PATCH] =?UTF-8?q?Modificada=20funci=C3=B3n=20de=20escape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wallamanta/helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wallamanta/helpers.py b/wallamanta/helpers.py index f4e89eb..b5b9bb4 100644 --- a/wallamanta/helpers.py +++ b/wallamanta/helpers.py @@ -3,5 +3,8 @@ TELEGRAM_ESCAPE_CHARACTERS = ['_', '*', '[', ']', '(', ')', '~', '>', '#', '+', def telegram_escape_characters(text): for character in TELEGRAM_ESCAPE_CHARACTERS: - text = text.replace(character, f'\{character}') + try: + text = text.replace(character, f'\{character}') + except: + pass return text \ No newline at end of file