-
Notifications
You must be signed in to change notification settings - Fork 238
When linkifying HTML messages, give priority to explicit link tags #2879
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
When linkifying HTML messages, give priority to explicit link tags #2879
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2879 +/- ##
===========================================
+ Coverage 74.27% 74.30% +0.02%
===========================================
Files 1530 1530
Lines 36521 36524 +3
Branches 7053 7054 +1
===========================================
+ Hits 27127 27140 +13
+ Misses 5708 5698 -10
Partials 3686 3686 ☔ View full report in Codecov by Sentry. |
…mbers-are-wrongly-formatted
|
@jmartinesp I think this will fix the issue describe here: #2861 (comment), can you confirm please? |
One of them, at least. You'd still be able to send So I guess for that one we'd still need to somehow check if the text and URL in the link are both URLs and if there is some mismatch between them, then display some piece of UI to confirm you want to open the link? |
OK, thanks. Yes, I was talking about the issue: Thanks. |
Type of change
Content
Motivation and context
Should fix #2291.
The method used for restoring URLSpans removed by the linkification process gave priority to the newly found links instead of the existing links the sender had explicitly set, which is wrong.
Also, it was especially hard to debug because the issue was focused in phone number being linkified and the detection of those phone numbers depend on the region code returned by the
TelephonyManager
service, which will vary from one device to another. It's a lot easier to spot with emails, i.e.Tests
[test me@matrix.org](https://example.com)
or its HTML equivalent.https://example.com
. Previouslyme@matrix.org
would get linkified and replace the link to the website.Tested devices
Checklist