Bug 446919 - html body style bleeds into mail header
Summary: html body style bleeds into mail header
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 5.19.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-13 09:33 UTC by Christian Spanier
Modified: 2021-12-13 09:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
render bug of email header information (7.00 KB, image/png)
2021-12-13 09:33 UTC, Christian Spanier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Spanier 2021-12-13 09:33:37 UTC
Created attachment 144505 [details]
render bug of email header information

SUMMARY
I noticed that some specific (spam) mails mess up the mail header (containing from, to, and date information, see screenshot). So I created a reproducible test case that illustrates the issue. It is the 
<body style="line-height: 0;margin: 0;padding: 0;background-color: #FFFFFF;">
that breaks rendering.

STEPS TO REPRODUCE
1. Send custom HTML mail using msmtp (or similar):
```bash
cat << EOF | mail -M "text/html" -s "Test" YOUR@MAIL.ADDRESS
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Test</title>
</head>
<body style="line-height: 0;margin: 0;padding: 0;background-color: #FFFFFF;">
</body>
</html>
EOF
```
2. check your mails

OBSERVED RESULT
see screenshot

EXPECTED RESULT
readable lines.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Comment 1 Christian Spanier 2021-12-13 09:48:10 UTC
Might be related to 441829 and 429393, but they overlap other HTML elements on top of the header.
This bug is specifically about CSS body styles that bleed into the header.