Table cells containing repeated newlines get garbled
Describe the bug When a collective contains a table, and the table cell contains consecutive newlines, the content gets garbled with a save/reload cycle.
To Reproduce Steps to reproduce the behavior:
- Create a new page inside a Collective.
- Insert a table into it.
- Enter content into a cell containing consecutive newlines.
(I entered these by copying a newline from the table and pasting it a couple times.)
- Save the page
- Load the page. See the changed content:
The content appears to jump boundaries in the Markdown representation.
I would have filed this in the Nextcloud text editor repo, but I'm not able to reproduce the problem outside of Collectives, oddly!
Expected behavior The text should be unchanged after a save/reload cycle.
Server details:
- Collectives app version: 2.9.1
- Nextcloud version: 27.1.3
- PHP Version: 8.1.25
- Database: PostgreSQL 15.5
Client details:
- OS: Ubuntu
- Browser: Firefox
- Browser version: 125.0.2
- Device: Desktop
Dear @asmecher, thanks for your report. This most likely is an issue in the Text app, thus I'll transfer the issue there.
Thanks, @mejo- -- as I've noted above, I wasn't able to reproduce the issue in the text editor e.g. in Files, but could easily reproduce it in Collectives. Not sure why the difference.
I tried to reproduce this with Collectives 2.10.1 on Nextcloud 29 an failed so far. Though there were some Tables related fixes in recent Text versions and you seem to run pretty outdated Nextcloud + Collectives versions. Could you upgrade your instance to Nextcloud 27.1.9 at least (ideally Nextcloud 28.0.5) and Collectives to 2.10.1 and see whether you're still able to reproduce the issue then?
I've requested an upgrade, and will confirm the new version and whether the bug is reproducible when we've been able to get to it.
I've upgraded to Collectives 2.12.0 and Nextcloud 29.0.2, and I can still reproduce the problem. If it helps, it appears you have to copy/paste multi-line content from a plaintext source, like a programmer's text editor.
https://github.com/nextcloud/text/assets/200411/46a38d58-9ec9-4c8f-8d0b-ec557f231639
Indeed, still reproducible when pasting block content with newlines into a table cell.
Manually adding newlines in a table cell on the other hand works as expected.