1 parent 40b0c57 commit a790431Copy full SHA for a790431
2 files changed
pyrogram/client/parser/html.py
@@ -108,7 +108,7 @@ def __init__(self, client: Union["pyrogram.BaseClient", None]):
108
self.client = client
109
110
def parse(self, text: str):
111
- text = utils.add_surrogates(str(text or "").strip())
+ text = utils.add_surrogates(text)
112
113
parser = Parser(self.client)
114
parser.feed(text)
pyrogram/client/parser/parser.py
@@ -31,6 +31,8 @@ def __init__(self, client: Union["pyrogram.BaseClient", None]):
31
self.markdown = Markdown(client)
32
33
def parse(self, text: str, mode: str = ""):
34
+ text = str(text or "").strip()
35
+
36
if mode is None:
37
return OrderedDict([
38
("message", text),
0 commit comments