From f3b33ef1d50d78862573cc5a6312ddacc6103658 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 7 Sep 2019 12:49:35 +0200 Subject: [PATCH] Revert "Enhance Parser when dealing with leading and trailing whitespaces" This reverts commit 8cdcf90b --- pyrogram/client/parser/html.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyrogram/client/parser/html.py b/pyrogram/client/parser/html.py index 82499cb3..5ec43874 100644 --- a/pyrogram/client/parser/html.py +++ b/pyrogram/client/parser/html.py @@ -86,8 +86,7 @@ class Parser(HTMLParser): for entities in self.tag_entities.values(): for entity in entities: - entity.offset += len(data) - len(data.lstrip()) # Ignore left whitespaces for offsets - entity.length += len(data.strip()) # Ignore all whitespaces (left + right) for lengths + entity.length += len(data) self.text += data