Bug 487377

Summary: (Some) Line breaks not rendered
Product: [Applications] NeoChat Reporter: Martin Riethmayer <ripper>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED FIXED    
Severity: normal CC: carl, misc, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Copy of broken message

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