Escape definitivo
This commit is contained in:
@@ -4,7 +4,7 @@ TELEGRAM_ESCAPE_CHARACTERS = ['_', '*', '[', ']', '(', ')', '~', '>', '#', '+',
|
|||||||
def telegram_escape_characters(text):
|
def telegram_escape_characters(text):
|
||||||
for character in TELEGRAM_ESCAPE_CHARACTERS:
|
for character in TELEGRAM_ESCAPE_CHARACTERS:
|
||||||
try:
|
try:
|
||||||
text = text.replace(character, f'\{character}')
|
text = text.replace(character, f'\\{character}')
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return text
|
return text
|
||||||
Reference in New Issue
Block a user