mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Remove unwanted html.unescape() call
This commit is contained in:
parent
8a933afc5d
commit
b719a2a432
|
@ -3,7 +3,7 @@ Simple HTML -> Telegram entity parser.
|
||||||
"""
|
"""
|
||||||
import struct
|
import struct
|
||||||
from collections import deque
|
from collections import deque
|
||||||
from html import escape, unescape
|
from html import escape
|
||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
from typing import Iterable, Optional, Tuple, List
|
from typing import Iterable, Optional, Tuple, List
|
||||||
|
|
||||||
|
@ -99,8 +99,6 @@ class HTMLToTelegramParser(HTMLParser):
|
||||||
**args)
|
**args)
|
||||||
|
|
||||||
def handle_data(self, text):
|
def handle_data(self, text):
|
||||||
text = unescape(text)
|
|
||||||
|
|
||||||
previous_tag = self._open_tags[0] if len(self._open_tags) > 0 else ''
|
previous_tag = self._open_tags[0] if len(self._open_tags) > 0 else ''
|
||||||
if previous_tag == 'a':
|
if previous_tag == 'a':
|
||||||
url = self._open_tags_meta[0]
|
url = self._open_tags_meta[0]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user