Bug 317177 - HTML emails CSS should not be applied to the header in th UI
Summary: HTML emails CSS should not be applied to the header in th UI
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: messageviewer (show other bugs)
Version: 5.1.*
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-22 10:26 UTC by Detlev Casanova
Modified: 2019-09-30 19:03 UTC (History)
4 users (show)

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


Attachments
An html mail that has bad CSS (10.89 KB, application/mbox)
2013-03-22 11:01 UTC, Detlev Casanova
Details
Email with CSS affecting header (1.12 KB, message/rfc822)
2019-09-30 16:51 UTC, Jonathan Marten
Details
Screen shot of previous attachment in HMTL view (16.67 KB, image/png)
2019-09-30 16:52 UTC, Jonathan Marten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Detlev Casanova 2013-03-22 10:26:11 UTC
When an HTML message is shown in kmail, the styling information is applied to the header in which the subject/sender/receiver are shown.

I have a CSS that hilights link when the cursor is hovering them and links (mailto:) in the header are also highlighted when hovered.

This is not a big problem but could be harmful in some situations. For example, coloring links with the same color as the header background would make sender and receiver email addresses invisible and interpreted as a bug in kmail.

Reproducible: Always

Steps to Reproduce:
1. Open an html email with css that modifies the appearance of the header.
2.
3.
Actual Results:  
Header apparence is modified

Expected Results:  
HEader appearance should not be modified
Comment 1 Laurent Montel 2013-03-22 10:35:47 UTC
need a example please :)
could you save as mbox and put it here.
(or if it's private could you send me it on montel@kde.org ? )
Thanks
Comment 2 Detlev Casanova 2013-03-22 10:47:22 UTC
It really is private, I'll remove sensible information and put it here then
Comment 3 Detlev Casanova 2013-03-22 11:01:13 UTC
Created attachment 78289 [details]
An html mail that has bad CSS
Comment 4 Laurent Montel 2013-03-22 11:45:45 UTC
Thanks
I can confirm it.
It's right I fixed it long time ago to avoid to change background color but not on hover.

Will fix it soon.
Comment 5 Laurent Montel 2013-03-22 13:50:24 UTC
Ok fixed.
but git.kde.org is down :)
so wait but will fix in 4.10.2
Comment 6 Laurent Montel 2013-03-23 06:03:08 UTC
Git commit 7776b35a0dd52450dfe21de43b962cad4d1841ff by Montel Laurent.
Committed on 23/03/2013 at 07:02.
Pushed by mlaurent into branch 'KDE/4.10'.

Fix Bug 317177 - HTML emails CSS should not be applied to the header in th UI

FIXED-IN: 4.10.2

M  +5    -0    messageviewer/csshelperbase.cpp
M  +4    -0    messageviewer/tests/data/encapsulated-with-attachment.mbox.html
M  +4    -0    messageviewer/tests/data/forward-openpgp-signed-encrypted.mbox.html
M  +4    -0    messageviewer/tests/data/no-content-type.mbox.html
M  +4    -0    messageviewer/tests/data/openpgp-encrypted.mbox.html
M  +4    -0    messageviewer/tests/data/openpgp-signed-encrypted.mbox.html
M  +4    -0    messageviewer/tests/data/signed-forward-openpgp-signed-encrypted.mbox.html
M  +4    -0    messageviewer/tests/data/smime-signed-encrypted.mbox.html
M  +4    -0    messageviewer/tests/data/tnef-one-file.mbox.html
M  +4    -0    messageviewer/tests/data/tnef-two-files.mbox.html

http://commits.kde.org/kdepim/7776b35a0dd52450dfe21de43b962cad4d1841ff
Comment 7 Tom Mittelstädt 2016-01-21 08:59:58 UTC
The bug is still present/reappeared in kmail2 5.0.2

eg every amazon order confirmation changes the header layout.
Comment 8 Laurent Montel 2016-01-21 09:36:44 UTC
I confirm it
I need to separate it from message.
Comment 9 Denis Kurz 2017-01-18 20:44:50 UTC
The attached message shows just fine in my KMail 5.4.1. Has this been fixed somewhere along the way?

If not, would anyone please care to attach a message that is still displayed incorrectly? I never observed this, and I don't get mail from Amazon.
Comment 10 Jonathan Marten 2019-09-30 16:51:26 UTC
Created attachment 122954 [details]
Email with CSS affecting header

Sanitised, with no personal information and safe to open.  The CSS that causes the problem is the "table {	table-layout: fixed; }".
Comment 11 Jonathan Marten 2019-09-30 16:52:16 UTC
Created attachment 122955 [details]
Screen shot of previous attachment in HMTL view
Comment 12 Laurent Montel 2019-09-30 18:33:10 UTC
fancy theme ?
Comment 13 Jonathan Marten 2019-09-30 18:49:49 UTC
No, just the standard "Classic" theme
Comment 14 Laurent Montel 2019-09-30 19:03:00 UTC
Git commit 7fc59ab359d08c828e1e067c7abfae1af1409db2 by Laurent Montel.
Committed on 30/09/2019 at 19:02.
Pushed by mlaurent into branch 'Applications/19.08'.

Fix Bug 317177 - HTML emails CSS should not be applied to the header in th UI

FIXED-IN: 5.12.2

M  +1    -0    plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fancyheaderstyleplugin.cpp

https://commits.kde.org/kdepim-addons/7fc59ab359d08c828e1e067c7abfae1af1409db2