Closed ak4zh closed 4 years ago
This is invalid HTML. The correct text should be "Telegram &"
. The parser used by the library is not as tolerant as the one used by web browsers.
This is invalid HTML. The correct text should be
"Telegram &"
. The parser used by the library is not as tolerant as the one used by web browsers.
Having just encountered this same issue, and spending a while debugging it before discovering it's this... Is it not possible to provide a more clear error message in this case? "HTML parsing failed" or something? If message isn't empty going into the parser, and is empty when it comes out, something has gone wrong.
Checklist
pip install -U https://github.com/LonamiWebs/Telethon/archive/master.zip
and triggered the bug in the latest version.If client parse mode is set as html AND message has
&
character followed by anything but not space, the message will fail.Code that causes the issue
Traceback