Skip to content

Punctuation marks are prefixed with backslashes in message body #1260

Closed
@rom4nik

Description

@rom4nik

Steps to reproduce

  1. Go to a room
  2. Type e.g. !ping or .,*"':;!? in message box
  3. Send message

Outcome

What did you expect?

content.body in message has !ping value.

What happened instead?

{
    "content": {
        "body": "\\!ping",
        "format": "org.matrix.custom.html",
        "formatted_body": "!ping",
        "msgtype": "m.text"
    },
    [...]
}

Another example:

{
    "content": {
        "body": "\\.\\,\\*\\\"\\'\\:\\;\\!\\?",
        "format": "org.matrix.custom.html",
        "formatted_body": ".,*\"':;!?",
        "msgtype": "m.text"
    },
    [...]
}

btw, single backslashes are visible in reply previews. Can't bisect right now, but it might have been caused by #1172, since a build a few commits before that PR was merged didn't have this issue.

Your phone model

Google Pixel 3

Operating system version

Android 12

Application version and app store

5a0e0a8 (current develop branch)

Homeserver

Synapse 1.91.1

Will you send logs?

No

Are you willing to provide a PR?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Rich-Text-EditorO-FrequentAffects or can be seen by most users regularly or impacts most users' first experienceS-MinorImpairs non-critical functionality or suitable workarounds existT-DefectSomething isn't working: bugs, crashes, hangs and other reported problemsTeam: Element X Feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions