Bug 300142 - Kmail can't render a html signature
Summary: Kmail can't render a html signature
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.14.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-16 15:06 UTC by Pedro Maia
Modified: 2017-01-14 12:59 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Adding a html signature (746.77 KB, image/png)
2012-05-18 12:49 UTC, Pedro Maia
Details
The email with html signature (584.50 KB, image/png)
2012-05-18 12:50 UTC, Pedro Maia
Details
Html editor (242.12 KB, image/png)
2012-05-18 13:29 UTC, Pedro Maia
Details
Html signature (1.43 KB, text/html)
2012-05-18 16:34 UTC, Pedro Maia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Maia 2012-05-16 15:06:07 UTC
If I choose a html file as signture Kmail only show the code in composer. 

Reproducible: Always

Steps to Reproduce:
1. Use a html file for signature
2. Send new email and add the signature
3.
Actual Results:  
Only html code appear

Expected Results:  
A html signature
Comment 1 Laurent Montel 2012-05-17 07:06:15 UTC
work fine here.
Could you create screenshot when you create mail
and when you receive mail.

thanks
Comment 2 Pedro Maia 2012-05-18 12:49:17 UTC
Created attachment 71186 [details]
Adding a html signature
Comment 3 Pedro Maia 2012-05-18 12:50:15 UTC
Created attachment 71187 [details]
The email with html signature
Comment 4 Laurent Montel 2012-05-18 12:55:29 UTC
Ah ! 
it's a signature from a file.
Don't know if it's supported (to add a html file signature).
Ok me I tested signature as html create in editor.

Will look at it soon.
But better to use html editor from identity to create it.
Comment 5 Pedro Maia 2012-05-18 13:29:26 UTC
Created attachment 71193 [details]
Html editor

When I try the html editor I can't align the text with the image. This screenshot shows what it should look like.
Comment 6 Laurent Montel 2012-05-18 15:47:16 UTC
Ok I see.
I how to create a real html widget editor for 4.10.
But it's right it's a bug in qtextedit.
Comment 7 Laurent Montel 2012-05-18 16:01:03 UTC
could you send me your html file for testing ?
Comment 8 Pedro Maia 2012-05-18 16:34:11 UTC
Created attachment 71196 [details]
Html signature
Comment 9 Laurent Montel 2012-05-22 06:39:19 UTC
Ok it's normal that we can reproduce same signature because we don't have support for create table in qtextedit.
I hope to fix it in 4.10 (not the next release).

Otherwise QTextEdit support table but we don't have support for creating it.


And I will add support for html file as signature in 4.10 too
but I can't for 4.9 too many changes.
I add this bug in my todo list
Comment 10 Laurent Montel 2012-07-18 06:51:30 UTC
Ok now in 4.10 we can insert directly html.
It's not perfect but it's better
Comment 11 Laurent Montel 2012-07-24 15:24:21 UTC
OK I added support for table in 4.10
Comment 12 Pierre Maraval 2014-03-25 19:34:37 UTC
Same problem on Kubuntu 13.10, Kmail Version 4.11.5.

Another aspect of this bug (I think) is that Kmail doesn't digitally sign the html signature correctly (HTML signature with "inline" images (data:image/gif;base64) ).  

So the sent signed email is invalid, even for other clients which otherwise can render html signatures in Kmail-sent mails.
Comment 13 Silver Salonen 2014-10-23 12:51:19 UTC
Still happens with 4.14.2.
Comment 14 Mike Jones 2015-03-30 15:40:10 UTC
(In reply to Pierre Maraval from comment #12)
> Same problem on Kubuntu 13.10, Kmail Version 4.11.5.
> 
> Another aspect of this bug (I think) is that Kmail doesn't digitally sign
> the html signature correctly (HTML signature with "inline" images
> (data:image/gif;base64) ).  
> 
> So the sent signed email is invalid, even for other clients which otherwise
> can render html signatures in Kmail-sent mails.

Re Pierre's data:image additional point.

I can confirm that (for kde 4.10.5 and kde 4.13.3) the addition of images via the <img src="data:..."> to an html signature causes s/mime signing to record an incorrect digest.  I notice that when the mail is sent the saved/received mail has its html image elements converted to <img src="cid:...> which are I believe generated on the fly. My best guess is that perhaps kmail reformats the html after the digest is calculated rendering it void.

To test this I have created two identity profiles the only difference being their name and whether the html signature contains img data block or not.  The result is that after signing the email with the images in the signature (both saved locally and sent over the wire) result in a red message box and "Status: Bad signature"; whereas emails sent without images render in a green box and verify correctly.
Comment 15 Mike Jones 2015-03-30 23:43:03 UTC
(In reply to Mike Jones from comment #14)
> (In reply to Pierre Maraval from comment #12)
> > Same problem on Kubuntu 13.10, Kmail Version 4.11.5.
> > 
> > Another aspect of this bug (I think) is that Kmail doesn't digitally sign
> > the html signature correctly (HTML signature with "inline" images
> > (data:image/gif;base64) ).  
> > 
> > So the sent signed email is invalid, even for other clients which otherwise
> > can render html signatures in Kmail-sent mails.
> 
> Re Pierre's data:image additional point.
> 
> I can confirm that (for kde 4.10.5 and kde 4.13.3) the addition of images
> via the <img src="data:..."> to an html signature causes s/mime signing to
> record an incorrect digest.  I notice that when the mail is sent the
> saved/received mail has its html image elements converted to <img
> src="cid:...> which are I believe generated on the fly. My best guess is
> that perhaps kmail reformats the html after the digest is calculated
> rendering it void.
> 
> To test this I have created two identity profiles the only difference being
> their name and whether the html signature contains img data block or not. 
> The result is that after signing the email with the images in the signature
> (both saved locally and sent over the wire) result in a red message box and
> "Status: Bad signature"; whereas emails sent without images render in a
> green box and verify correctly.

Additionally Adding a vcard (generated via kmail which inserts \r\n as per spec IIRC).  There may also be an issue with either kmail or MS exchange (though I doubt MS would want to remove it's precious carriage return character)  replacing \r with \n resulting in \n\n substitution for \r\n, and hence voiding the digest again.
Comment 16 Solerman Kaplon 2016-11-24 11:50:07 UTC
I upgraded to KMail 5.1.3 and image signatures are now showing correctly for me