Skip to content

Escape characters (backslashes) can cause bugged markup outputs #1759

Description

@Th-Underscore

Describe the bug

When including backslashes in a specific arrangement around upticks, markup is generated incorrectly and is sent literally in chat.

Image

Reproduction

  1. Type:

    `\`test\``
    

    into the composer.

  2. Send the message.

Expected behavior

In the provided repro case, it should apply code-block formatting onto the first backslash, then this section literally:

test``

It should look like:

Image

Platform and versions

1. OS: Ubuntu 24.04.4 LTS
2. Opera Developer 134.0.5938.0
3. Sable versions tested on:
  - Desktop client: v1.20.0-dev (2041349)
  - Homeserved webapp: v1.20.0-dev (0865d93)
  - Official webapp: v1.20.0-dev (e3e1d57)
4. Matrix servers tested on:
  - matrix.org
  - My private Synapse server

Additional context

Doesn't happen with the live preview in #1757.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions