Bug 458800 - Line breaks in sent message get removed
Summary: Line breaks in sent message get removed
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-06 16:42 UTC by Nate Graham
Modified: 2022-10-18 19:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Can't even (270.55 KB, image/jpeg)
2022-09-06 16:43 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2022-09-06 16:42:41 UTC
Git master everything KDE on top of Fedora 36.


STEPS TO REPRODUCE
Send the following message:

> BUG: can't
> 
> STEPS TO REPRODUCE
> try
> 
> ACTUAL RESULTS
> can't even
> 
> EXPECTED RESULTS
> be able to even
> 
> ADDITIONAL INFORMATION
> worked in the last version

OBSERVED RESULT
It gets sent as:

> BUG: can't STEPS TO REPRODUCE
> try ACTUAL RESULTS
> can't even EXPECTED RESULTS
> be able to even ADDITIONAL INFORMATION
> worked in the last version

EXPECTED RESULT
It gets sent exactly as I typed it, with the line breaks preserved


ADDITIONAL INFORMATION
It's not just a display bug, as Element shows the mangled message the same as NeoChat does. So the formatting is actually being lost before the message is sent, not just displayed incorrectly.
Comment 1 Nate Graham 2022-09-06 16:43:42 UTC
Created attachment 151872 [details]
Can't even
Comment 2 James Graham 2022-09-07 17:31:06 UTC
This is a known issue that will be fixed when https://invent.kde.org/network/neochat/-/merge_requests/492 gets merged. Basically we shouldn't be stripping the paragraph html tags in rich text as that is how multiple line breaks are handled.
Comment 3 James Graham 2022-10-18 19:09:40 UTC
Git commit 595ece81083e87d1f13325196dce96881f99f1eb by James Graham.
Committed on 18/10/2022 at 19:09.
Pushed by nvrwhere into branch 'master'.

Fix line breaks being removed

Stop stripping paragraph tags as this is causing line breaks to be removed in the formatted body. Any double new line in the plain text is treated as a paragraph in rich text.

M  +0    -2    src/actionshandler.cpp

https://invent.kde.org/network/neochat/commit/595ece81083e87d1f13325196dce96881f99f1eb