Skip to content

Escaped Parentheses Followed by a Backslash Produces KaTeX Error in Chat #12336

@DLAtWork

Description

@DLAtWork

Description:

Sending a string with escaped parentheses followed by a backslash produces a KaTeX parser error in chat.

Steps to reproduce:

  1. Enter the following string in chat: \(\.*\)

Expected behavior:

The text \(\.*\) will appear in chat.

Actual behavior:

The error KaTeX parse error: Can't use function '\.' in math mode at position 1: \̲.̲* appears in chat.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.69.2
  • Operating System: Ubuntu 18.04.1
  • Deployment Method: Snap
  • Number of Running Instances: 1

Additional context

It appears to be triggered by the backslash that immediately follows the escaped parentheses. Putting another character between the escaped parentheses and the backslash does not trigger the bug.

May be related to the following issues: #8640 #8644 #8676 #8970

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions