-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
User descriptions support common URI schemes #2496
base: master
Are you sure you want to change the base?
Conversation
Welcome! It's refreshing to see a new contributor. I don't think I've ever seen an That said, ideally we should rewrite any link that doesn't match |
Hi! Thanks for your comments on this. Can I continue working on this issue? I could begin implementing this approach. Is the rendered markdown text the only entry point to external URLs? Or we should use a more general approach that handles all components for example? |
Of course.
It is. |
Hi, this is my first time contributing to liberapay. If there's anything needed, please feel free to point out!
What's fixed:
As #2492, some URI schemes are not supported yet. By inspecting, the reason is that the regex in
markdown.py
only matcheshttp
,https
, andxmpp
. Common URI schemes are added to this regex.Test string:
Render result before fix:
Render result after fix:
For the common URI schemes, I referred to this list. I only added the most common ones for now since handling other uri such as files or app deeplinks may not be the desired behavior.