mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
HTML symbols not replaced
HTML symbols not replaced because return is before replace.
This commit is contained in:
parent
ad4be5c0ae
commit
bf844ed202
@ -477,10 +477,10 @@ class Message(JsonDeserializable):
|
||||
url = "tg://user?id={0}".format(user.id)
|
||||
elif type == "mention":
|
||||
url = "https://t.me/{0}".format(text[1:])
|
||||
text = text.replace("&", "&").replace("<", "<").replace(">", ">")
|
||||
if not type or not _subs.get(type):
|
||||
return text
|
||||
subs = _subs.get(type)
|
||||
text = text.replace("&", "&").replace("<", "<").replace(">", ">")
|
||||
return subs.format(text=text, url=url)
|
||||
|
||||
offset = 0
|
||||
|
Loading…
Reference in New Issue
Block a user