mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
update
updated "== None" to "is None" and adjusted the else statement
This commit is contained in:
parent
34acae9a59
commit
669c18fdc0
@ -399,11 +399,10 @@ def escape(text: str) -> str:
|
||||
:return: the escaped text
|
||||
"""
|
||||
chars = {"&": "&", "<": "<", ">": ">"}
|
||||
if text == None:
|
||||
if text is None:
|
||||
return None
|
||||
else:
|
||||
for old, new in chars.items():
|
||||
text = text.replace(old, new)
|
||||
for old, new in chars.items(): text = text.replace(old, new)
|
||||
return text
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user