Skip to content

Escaped parentheses in backticks break message #8970

@reitzig

Description

@reitzig

Description:

Escaped parentheses in backticks break horribly.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.59.3
  • Operating System: GNU/Linux 3.2.0-4-amd64
  • Deployment Method(snap/docker/tar/etc): unknown
  • Number of Running Instances: 1
  • DB Replicaset Oplog: OpLog disabled
  • Node Version: v4.8.6

Steps to Reproduce:

Post message with escaped parenthesis in backticks, e.g.

`^\s*\((\w+)\)\s*$\`

2017-11-29_01

Expected behavior:

See message with \( ... \) in code formatting, that is "^\s*\((\w+)\)\s*$".

Actual behavior:

2017-11-29_02

The shown string (some base64?) changes with every edit, even if the message itself is not changed.

Workaround

This is apparently some bad interaction with KaTeX; disabling "Parenthesis Syntax" returns code formatting to the expected behaviour.
Dollar syntax does not seem to be affected in the same way.

KaTeX should be disabled inside pre-/code-formatted elements.

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