element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.04k stars 146 forks source link

Text within the anchor tag `<a>` sometimes doesn't produce links, while other clients like Element X for iOS and Element Desktop shows it correctly #2871

Closed vincejv closed 5 months ago

vincejv commented 5 months ago

Steps to reproduce

  1. Send a message with following formatted_body:
    <h4><a href='https://www.reddit.com/r/linux/comments/1cu2rxl/registration_open_fedora_40_release_party_on_may/'>Registration Open: Fedora 40 Release Party on May 24-25 - Fedora Magazine</a></h4>submitted by    /u/qualia-assurance   [link]   [comments]<br><img src='mxc://matrix.domain.com/TrAgqiYmEFULgGpkRKSqQVzG' width='16' /> newest submissions : linux - 07:25 PM | 2024-05-17<br><strong>Tech News</strong>
  2. View the said message on Element X for Android app
  3. Presented wtih this layout, link not clickable image

Outcome

What did you expect?

Link is clickable like other platforms Element for Desktop: image

Element X for iOS: image

What happened instead?

Link is not clickable on Element X for Android, however 24-25 is but it's treated as tel:2425 link image

Event source

{
  "type": "m.room.message",
  "sender": "@miniflux:matrix.domain.com",
  "content": {
    "msgtype": "m.text",
    "format": "org.matrix.custom.html",
    "body": "Registration Open: Fedora 40 Release Party on May 24-25 - Fedora Magazinesubmitted by    /u/qualia-assurance   [link]   [comments] newest submissions : linux - 07:25 PM | 2024-05-17Tech News",
    "formatted_body": "<h4><a href='https://www.reddit.com/r/linux/comments/1cu2rxl/registration_open_fedora_40_release_party_on_may/'>Registration Open: Fedora 40 Release Party on May 24-25 - Fedora Magazine</a></h4>submitted by    /u/qualia-assurance   [link]   [comments]<br><img src='mxc://matrix.domain.com/TrAgqiYmEFULgGpkRKSqQVzG' width='16' /> newest submissions : linux - 07:25 PM | 2024-05-17<br><strong>Tech News</strong>"
  },
  "origin_server_ts": 1715947159794,
  "unsigned": {
    "age": 326869
  },
  "event_id": "$4poaozo0JgIpC6sjTdztVHc7ZPPBjVmygFUjh8vQkeY",
  "room_id": "!YbRnSlgHyZfmuunCYC:matrix.domain.com"
}

Your phone model

No response

Operating system version

Android 13

Application version and app store

Element X Version 0.4.12 (40004120)

Homeserver

Synapse 1.107.0

Will you send logs?

No

Are you willing to provide a PR?

No

vincejv commented 5 months ago

Closing as a dupe of https://github.com/element-hq/element-x-android/issues/2291