Skip to content

message.text_* returns link as hyperlink. #773

@91DarioDev

Description

@91DarioDev

after latest updates the library using "message.text_html" method (i didn't check with markdown) returns links as text_link.

so a message like "test www.google.com" is returned by message.text_html as "test <a href="www.google.com">www.google.com</a>" despite it was not an text_link.

before of the latest udpates it worked fine and it was able to reflect how the sent message was formatted. so if the message didn't contain html tags it didn't return html tags and viceversa.

actually it's not possible to distinguish if the user sent a link or text_link using that attribute and also if a bot wants to echoes messages respecting the formatting style a possible limit is when an user sends 101 link and the bot will try to echoes with 101 text_link (while the maximum formatting things in a message is 100).

to reproduce:
print a link sent to the bot using "update.message.text_html" example: "t.me/telegram"
expcted behaviour:
you get "t.me/telegram"
actual behaviour:
you get <a href="t.me/telegram">t.me/telegram</a>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions