Bug 106968

Summary: HTML formatting is lost when saving in drafts folder
Product: [Unmaintained] kmail Reporter: Philippe Rigault <prigault>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: axel.kimmel, murphyjj
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Philippe Rigault 2005-06-07 15:53:06 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Compiled From Sources
Compiler:          gcc-3.4.3 Fedora Core 3 x86_84
OS:                Linux

How to reproduce:

1. Create a new message with HTML formatting

2. Save in drafts folder

3. Reopen message -> all formatting info is lost

Cheers,

Philippe
Comment 1 Don Sanders 2005-06-09 09:35:43 UTC
I can confirm this. It might be awhile before I get a chance to look 
into it though.
Comment 2 BJ Blanchard 2005-11-21 23:10:07 UTC
Please merge this with bug 116327.  Duplicate bug.
Comment 3 Philip Rodrigues 2005-11-25 15:15:39 UTC
*** Bug 116327 has been marked as a duplicate of this bug. ***
Comment 4 Philippe Rigault 2006-02-01 20:21:20 UTC
Bug still present in KDE 3.5.1

The changelog at
http://kde.org/announcements/changelogs/changelog3_5to3_5_1.php
wrongly mentions this bug as fixed.

Was this supposed to fix it ?

2006-01-12 19:30 +0000 [r497436]  eschepers

	* branches/KDE/3.5/kdepim/kmail/partNode.cpp,
	  branches/KDE/3.5/kdepim/kmail/kmedit.cpp,
	  branches/KDE/3.5/kdepim/kmail/kmcomposewin.cpp: The QTimer
	  initializes spelling after the html message is displayed. This
	  way, all formatting is undone. Spelling is already initiated in
	  the constructor of KMComposeWin, so no harm is done deleting the
	  QTimer. BUG:106968
Comment 5 Edwin Schepers 2006-02-01 20:56:47 UTC
yes, for me this fixes the problem. Maybe someone else can confirm whether this fix does or doesn't do what it should.
Comment 6 Philippe Rigault 2006-02-01 21:47:12 UTC
After double checking that the sources of 3.5.1 did in fact have the r497436 modifications, I did further testing and found three incorrect behaviours:

1. Messages with HTML formatting saved in 'drafts' folder never show up with HTML formatting in the preview pane. That is, single-clicking on them in the messages pane displays an unformatted message in the message preview pane with "NO HTML MESSAGE" on the side. The correct behaviour IMHO is to detect an HTML message and display the standard warning:

Note: This is an HTML message. For security reasons, only the raw HTML code is shown. If you trust the sender of this message then you can activate formatted HTML display for this message by clicking here.

2. Opening the message by double-clicking works in some cases, ant does not work in other cases. I can send examples upon request. I found that when I use two identities, messages using my default identity correctly render HTML, but messages using an alternate identity do not.

3. Copy-paste does not work across different messages, i.e after opening a message correctly rendering HTML formatting, copying some text and pasting it in the same messages does conserve HTML formatting, but pasting it in another message loses HTML formatting.

Cheers,

Philippe

Comment 7 Edwin Schepers 2006-02-02 21:48:52 UTC
Hi Philippe,
issue 1: I found out that if "Prefer HTML to plain text" is unchecked in the Security page of the configuration, the HTML is not shown (and should be as you describe, imo). However, if the checkbox _is_ checked, the HTML is shown correctly.
issue 2: I cannot reproduce this.
issue 3: This would be another bug. Please create a new bugreport for this one.

Regards,
Edwin
Comment 8 Philippe Rigault 2006-02-02 22:17:11 UTC
>issue 1: I found out that if "Prefer HTML to plain text" is unchecked 
> in the Security page of the configuration, the HTML
> is not shown (and should be as you describe, imo).
> However, if the checkbox _is_ checked, the HTML is shown correctly.

Well, it gets more interesting :-). If "Prefer HTML to plain text" is checked, then:
 - the HTML formatting is shown in the message preview pane (for some messages, see issue 2)
 - However, double-clicking on the message now results in _never_ rendering HTML formatting in the compose window.

>issue 2: I cannot reproduce this. 
I am sending two examples to you privately for this.

>issue 3: This would be another bug. Please create a new bugreport for this one.
This is now Bug 121251
Comment 9 Bram Schoenmakers 2007-03-08 22:28:56 UTC
*** Bug 121697 has been marked as a duplicate of this bug. ***
Comment 10 Edwin Schepers 2007-12-11 21:44:42 UTC
works with at least KDE3.5.7
Comment 11 Craig 2007-12-12 16:31:43 UTC
Still broken.  I edit a draft and it has lost all formatting. 
Comment 12 Thomas McGuire 2007-12-15 18:18:01 UTC
> Still broken.