Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message.text_* returns link as hyperlink. #773

Closed
91DarioDev opened this issue Aug 5, 2017 · 0 comments · Fixed by #777
Closed

message.text_* returns link as hyperlink. #773

91DarioDev opened this issue Aug 5, 2017 · 0 comments · Fixed by #777

Comments

@91DarioDev
Copy link

91DarioDev commented Aug 5, 2017

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>

@Eldinnie Eldinnie mentioned this issue Aug 7, 2017
tsnoam pushed a commit that referenced this issue Aug 7, 2017
`text_html` & `text_markdown` reverted to the old semantics - URLs are not converted to hyperlinks.
To get the new behaviour there are matching `text_html_urled` & `text_markdown_urled` properties.
fixes #773
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant