Bug 463167

Summary: Text in HTML Email turns into black on black after being sent = invisible
Product: [Applications] kmail2 Reporter: thomas
Component: composerAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: auxsvr
Priority: NOR    
Version: 5.22.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Origin (1), and result (2)

Description thomas 2022-12-17 20:05:00 UTC
Created attachment 154655 [details]
Origin (1), and result (2)

I every now and then start my emails in LibreOffice Writer and copy the final text into Kmail. This has never been an issue, but at some point (>30. Nov.) this text ends up black on black when sent.

STEPS TO REPRODUCE
1. Write text in LibreOffice Writer 
2. Copy and Paste into Kmail
3. Text format is html, text looks normal, all formatting (links/colour/etc.) is as expected, text is the usual black on white
4. Send email
5. Email in sent items shows text with black background = black bar = invisible text. The original text is there, because it becomes visible when the black bar is selected with the mouse.

The screenshot shows the original text (#1) and the result (#2) in sent items. The part that's readable is highlighted.

OBSERVED RESULT
The html created by Kmail looks like below:
 <div style="position: relative"><p style="margin-top:12;margin-bottom:0;margin-left:0;margin-right:0;"><span style="background-color:#000000;">This is a test</span></p> 

The background-color=#0000 seems to come out of nowhere?

EXPECTED RESULT
The origin and when editing in Kmail the background is white, expected result is that it stays like this when the email is sent.

Operating System: Arch Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.0.12-arch1-1 (64-bit)
Graphics Platform: X11