RocketChat / RocketChat/Rocket.Chat

New KaTeX bug, line breaks appear as `<br>`

Open
#16,129 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area: ui/ux message rendering triaged type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

This definitely wasn't happening last week, not sure when my RocketChat would've upgraded however. I'm on v2.15.2.

Steps to reproduce:
  1. Do some KaTeX (sorry if the vulgarness seems unprofessional).
    image
  2. That worked fine and looks great.
  3. Add some line breaks.
    image
  4. It's broke. Line breaks show as HTML line breaks.
Expected behavior:

Just do the KaTeX. Ignore newline characters like it did before, UNLESS you use the KaTeX commands for newline.

Actual behavior:

<br> is printed for every newline character.

Client Setup Information
  • Desktop App or Browser Version: v2.15.2
  • Operating System: Windows 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Rocket.Chat v2.15.2 using KaTeX with ordinary line breaks and compare it with KaTeX commands for newlines. Trace the message rendering path to find where newline characters become literal HTML breaks; done means ordinary newlines are ignored while intentional KaTeX line breaks still render correctly.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.