Remove unwanted html.unescape() call

This commit is contained in:
Lonami Exo 2019-08-04 10:09:23 +02:00
parent 8a933afc5d
commit b719a2a432

View File

@ -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]