Problem with break lines in chat
See original GitHub issueDescription
In the current chat when I sent a message with break lines this message is rendered wrong.
Current behavior
my message with tree lines
The wrong result
Expected Behavior
the message needs to be rendered like this:
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, '<') .replace(/>/g, '>') .replace(/\n/g, '<br/>'); const processedMessage = [];
when I inspect the HTML shows like this
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:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The proposed solution looks good, care to send a PR?
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.