Skip to content

Quote escaped by the IRC bridge are not sent correctly to discord #730

@erdnaxeli

Description

@erdnaxeli

Hi,

Here is a message sent from a user using the matrix-appservice-irc bridge:

{
  "content": {
    "body": "Le bridge n'avait pas ce problème avant le restart de la semaine dernière si jamais ça peut aider :shrug:",
    "format": "org.matrix.custom.html",
    "formatted_body": "Le bridge n'avait pas ce problème avant le restart de la semaine dernière si jamais ça peut aider :shrug:",
    "msgtype": "m.text"
  },
  "event_id": "...",
  "origin_server_ts": 1631540156568,
  "room_id": "...",
  "sender": "...",
  "type": "m.room.message",
  "unsigned": {
    "age": 69466870
  },
  "user_id": "...",
  "age": 69466870
}

We can see that the formatted body contains '. This is sent as is to discord, which is not expected. I would expect to see a quote ' in the discord message.

I read the spec about org.matrix.custom.html, but it says nothing about escaping quotes. As this is valid HTML, I think it is the discord bridge job to handle it correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-DefectBugs, crashes, hangs, vulnerabilities, or other reported problems.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions