mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
commit
6373af78f3
@ -399,7 +399,10 @@ def escape(text: str) -> str:
|
|||||||
:return: the escaped text
|
:return: the escaped text
|
||||||
"""
|
"""
|
||||||
chars = {"&": "&", "<": "<", ">": ">"}
|
chars = {"&": "&", "<": "<", ">": ">"}
|
||||||
for old, new in chars.items(): text = text.replace(old, new)
|
if text is None:
|
||||||
|
return None
|
||||||
|
for old, new in chars.items():
|
||||||
|
text = text.replace(old, new)
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user