question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with break lines in chat

See original GitHub issue

Description

In the current chat when I sent a message with break lines this message is rendered wrong.

Current behavior

my message with tree lines image

The wrong result image

Expected Behavior

the message needs to be rendered like this: image

Possible Solution

I believe we have to change on line 36,37,38,39 in this file: https://github.com/jitsi/jitsi-meet/blob/master/react/features/chat/components/web/ChatMessage.js

const escMessage = messageToDisplay.replace(/</g, '&lt;') .replace(/>/g, '&gt;') .replace(/\n/g, '<br/>'); const processedMessage = []; when I inspect the HTML shows like this image

Steps to reproduce

start a chat and send a message with multiple lines executing CTRL+SHIFT+ENTER to put a new line

Environment details

I’m using Chrome in Ubunto 18.01

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
saghulcommented, Aug 21, 2019

The proposed solution looks good, care to send a PR?

0reactions
stale[bot]commented, Feb 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Line Breaks in Chat - Instructure Community
In the dedicated Chat area of Canvas, can I insert line breaks when I copy and paste blocks of text? Here's why: When...
Read more >
How to force a line break in chat conversation? - css
The word-wrap: break-word property actually is working with me. The problem previously cause me no working is that I defined a white-space: ...
Read more >
Where Lines Break is Complicated. Here's all the Related ...
One possibility is overflow: hidden; which is a bit of a blunt force weapon that will stop the text (or anything else) from...
Read more >
[Marked MD Parser] Line break in messages · Issue #11675
Steps to reproduce:​​ Go to any channel and type your message with line breaks using Shift plus Enter key.
Read more >
line-break - CSS: Cascading Style Sheets - MDN Web Docs
Break text using the least restrictive line break rule. Typically used for short lines, such as in newspapers. normal. Break text using the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found