Bug 487377 - (Some) Line breaks not rendered
Summary: (Some) Line breaks not rendered
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 18:04 UTC by Martin Riethmayer
Modified: 2024-09-07 10:20 UTC (History)
3 users (show)

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


Attachments
Copy of broken message (5.58 KB, text/plain)
2024-05-22 18:04 UTC, Martin Riethmayer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Riethmayer 2024-05-22 18:04:18 UTC
Created attachment 169707 [details]
Copy of broken message

SUMMARY
Line breaks from "Bug Safari" are ignored.

STEPS TO REPRODUCE
1. Load attached matrix message with formatted body

OBSERVED RESULT
No line breaks are visible in NeoChat (but are inside the formatted_body). They are visible in other clients (e.g. Elements on Android, webchat.kde.org ). Other HTML formatting (e.g. the links) work fine.

EXPECTED RESULT
Line breaks should be visible

SOFTWARE/OS VERSIONS

ADDITIONAL INFORMATION
Bug Safari: https://invent.kde.org/bbonacci/bug-safari - see e.g. https://invent.kde.org/bbonacci/bug-safari/-/blob/master/safari.py?ref_type=heads#L75 where a line break is inserted. The HTML is using a self-closing BR element <br/> without a space between "r" and "/"
Comment 1 Claire 2024-09-06 04:09:14 UTC
This happens when the line breaks are "<br />", and not when they're "<br>".
Comment 2 Claire 2024-09-06 05:08:10 UTC
Scratch that, it seems like "<br>" and "<br />" are handled properly, but not "<br/>".
Comment 3 Martin Riethmayer 2024-09-06 07:02:39 UTC
I've made a merge request for Bug Safari ( https://invent.kde.org/bbonacci/bug-safari/-/merge_requests/3 ) to include a space before the self-closing slash, but I think that maybe NeoChat should be a bit more relaxed in handling self-closing <br>-elements, too?
Comment 4 Bug Janitor Service 2024-09-06 07:12:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/1876