Newlines removed when paste text to chat box.
Steps to reproduce
1- Install NextCloud 15 2- Install NextCloud Talk 5.0.2. 3- Start text chat. 4- Try to paste any text that includes at least 1 newline, and send it. 5- All new lines will be lost when text sent.
Expected behaviour
Text to be sent exactly as it is, with the newlines intact.
Actual behaviour
newlines removed, leaving text glued to each other.
Browser
. Microphone available: yes/no no Camera available: yes/no no Operating system: Windows/Ubuntu/... All Browser name: Firefox/Chrome/... Chrome Browser version: 50.1/55/... Several
Browser log
Spreed app
Spreed app version: (see apps admin page: /index.php/settings/apps)
5.0.2
Custom TURN server configured: yes/no (see additional admin settings: /index.php/settings/admin/additional)
Custom STUN server configured: yes/no (see additional admin settings: /index.php/settings/admin/additional)
no
Server configuration
Operating system: Ubuntu/RedHat/... Ubuntu Web server: Apache/Nginx Apache Database: MySQL/Maria/SQLite/PostgreSQL MySQL PHP version: 7.2 Nextcloud Version: (see admin page) 15 List of activated apps: Almost all of them
Nextcloud configuration:
Server log (data/nextcloud.log)
I just copied your steps:
1- Install NextCloud 15
2- Install NextCloud Talk 5.0.2.
3- Start text chat.
4- Try to paste any text that includes at least 1 newline, and send it.
5- All new lines will be lost when text sent.
And it correctly posted that as 5 lines.
Maybe you are using different version.
Care to join my NC installation for testing ?
Care to join my NC installation for testing ?
feel free to send an account to <my github name>@nextcloud.com
Sent
Also works fine on your instance, maybe the problem is where you copy it from?
No I don't think so, I am using Ubuntu desktop, my associate is using Windows 10, but we both use Chrome browser.
And the content you copy from is a website? Or word document, or...?
Several, with same result, I can give you remote access to test yourself (teamviewer or something).
Okay, managed to reproduce now, it only happens in Chrome.
When you copy: 1- Install NextCloud 15 2- Install NextCloud Talk 5.0.2. 3- Start text chat. 4- Try to paste any text that includes at least 1 newline, and send it. 5- All new lines will be lost when text sent.
Firefox inserts this as:
1- Install NextCloud 15<br>
2- Install NextCloud Talk 5.0.2.<br>
3- Start text chat.<br>
4- Try to paste any text that includes at least 1 newline, and send it.<br>
5- All new lines will be lost when text sent.
But Chrome/Chromium inserts:
1- Install NextCloud 15
<div>2- Install NextCloud Talk 5.0.2.</div>
<div>3- Start text chat.</div>
<div>4- Try to paste any text that includes at least 1 newline, and send it.</div>
<div>5- All new lines will be lost when text sent.</div>
That however does not trigger https://github.com/nextcloud/spreed/blob/58f0bd6d2f5d6ec6a12fbd9ef82991fa0a99334a/js/views/chatview.js#L701-L702 to instead line breaks into the text which are then later taken into account when getting .text()
@Elfanar fix is in https://github.com/nextcloud/spreed/pull/1570
Tested the fix and it is working, thank you very much ! Can I contact you in Private again please ?