Skip to content

Commit 317685c

Browse files
committed
Further improve the HTML parser
Related to #682
1 parent 7c9f1cb commit 317685c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyrogram/parser/html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def __init__(self, client: Optional["pyrogram.Client"]):
111111

112112
async def parse(self, text: str):
113113
# Strip whitespace characters from the end of the message, but preserve closing tags
114-
text = re.sub(r"\s*(</[\w]*>)\s*$", r"\1", text)
114+
text = re.sub(r"\s*(</[\w</>]*>)\s*$", r"\1", text)
115115

116116
parser = Parser(self.client)
117117
parser.feed(utils.add_surrogates(text))

0 commit comments

Comments
 (0)