Skip to content

Spoilered URLs sent from Telegram include <span data-mx-spoiler> in href on Matrix #971

Open
@rom4nik

Description

@rom4nik

Bridge @ 0068341. Issue as in title:

image

Event content on Matrix:

"content": {
    "body": "some text before the spoiler: https://matrix.org",
    "external_url": "https://t.me/c/4597680902/6021",
    "fi.mau.telegram.source": {
      "chat_id": 4597680902,
      "id": 6021,
      "peer_type": "chat",
      "space": 1714758850
    },
    "format": "org.matrix.custom.html",
    "formatted_body": "some text before the spoiler: <a href='http://<span data-mx-spoiler>https://matrix.org</span>'><span data-mx-spoiler>https://matrix.org</span></a>",
    "msgtype": "m.text"
  },

Depending on client, this URL might not be rendered at all (Element Desktop):

image

Or appear as a normal URL, but navigating to the incorrect URL taken from formatted_body (Element X Android):

Screenshot_20240824-190632

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