del_surrogate for HTML inline URLs

Closes #3693.
This commit is contained in:
Lonami Exo 2022-09-20 18:18:26 +02:00
parent ff0f9b0e8f
commit 1f42e6e32f

View File

@ -86,7 +86,7 @@ class HTMLToTelegramParser(HTMLParser):
EntityType = MessageEntityUrl
else:
EntityType = MessageEntityTextUrl
args['url'] = url
args['url'] = _del_surrogate(url)
url = None
self._open_tags_meta.popleft()
self._open_tags_meta.appendleft(url)