Bug 65646 - when replying to multipart/alternative with local override of global "prefer HTML", composer shows HTML source
Summary: when replying to multipart/alternative with local override of global "prefer ...
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: composer (show other bugs)
Version: 1.10.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Marc Mutz
URL:
Keywords: testcase, triaged
Depends on:
Blocks:
 
Reported: 2003-10-07 09:17 UTC by Amit Shah
Modified: 2009-12-06 16:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
html mail message (3.31 KB, message/rfc822)
2003-10-07 14:01 UTC, Amit Shah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Shah 2003-10-07 09:17:31 UTC
Version:           1.5.3 (using KDE KDE 3.1.4)
Installed from:    Debian testing/unstable Packages
OS:          Linux

when replying to html mails, composer doesn't strip off the html tags. The preview of the mail (when 'prefer html to plain text' is turned off) is fine. It's just the composer that doesn't strip the html tags.

Similar reports to this bug were submitted earlier and marked resolved. One even mentioned it fixed in 3.1.2. But, it apparently is not.
Comment 1 Stephan Kulow 2003-10-07 09:29:03 UTC
We either do not parse HTML at all or we parse it, then replying works fine. So if you click the 
render it link, you can reply to it just fine. 
Comment 2 Amit Shah 2003-10-07 09:42:24 UTC
some messages have plain-text body parts and hence the "render it" link 
doesn't show up. for this, we'll have to explicitly select the html body part, 
click on render it and then hit reply.... 
 
I'm sure this can be done in a better way 
Comment 3 Stephan Kulow 2003-10-07 11:28:16 UTC
attach an example mail. 
Comment 4 Marc Mutz 2003-10-07 12:37:31 UTC
Subject: Re:  html tags should be stripped off in composer =?iso-8859-1?q?when=09current_folder_has?= "prefer html to plain text" turned off

First of all: are we talking about "reply" or "forward inline" or 
"resend" or "edit" here?

On Tuesday 07 October 2003 09:42, Amit Shah wrote:
<snip>
> some messages have plain-text body parts and hence the "render it"
> link doesn't show up.

OK, so we're talking about multipart/alternative messages. Do you have 
"prefer HTML to plain text" enabled or disabled?

If enabled: Is it that the composer shows the HTML source even if the 
reader _did_ render the HTML? If so, do you have "prefer HTML to plain 
text" enabled globally or for that specific folder only? If {global,
local}: Does it work if you change to {local,global}?

If not enabled: Is it that the composer shows the HTML source even 
though the reader chose plain text? Is the plain text part empty (as is 
the case for some SPAM)?

> for this, we'll have to explicitly select the 
> html body part, click on render it and then hit reply....

Or do you want to tell us that you have HTML message that are labeled as 
text/plain and you want us to second-guess the given type and treat it 
as HTML?

> I'm sure this can be done in a better way

Marc

Comment 5 Amit Shah 2003-10-07 13:04:13 UTC
Subject: Re:  html tags should be stripped off in composer when current folder has "prefer html to plain text" turned off

On Tuesday 07 Oct 2003 16:07, Marc Mutz wrote:
> ------- Additional Comments From mutz@kde.org  2003-10-07 12:37 -------
> Subject: Re:  html tags should be stripped off in composer
> =?iso-8859-1?q?when=09current_folder_has?= "prefer html to plain text"
> turned off
>
> First of all: are we talking about "reply" or "forward inline" or
> "resend" or "edit" here?

reply.

> On Tuesday 07 October 2003 09:42, Amit Shah wrote:
> > some messages have plain-text body parts and hence the "render it"
> > link doesn't show up.
>
> OK, so we're talking about multipart/alternative messages. Do you have
> "prefer HTML to plain text" enabled or disabled?

it's disabled (I've written it in the subject line too :-) )

> If enabled: Is it that the composer shows the HTML source even if the
> reader _did_ render the HTML? If so, do you have "prefer HTML to plain
> text" enabled globally or for that specific folder only? If {global,
> local}: Does it work if you change to {local,global}?

in any case, globally, it is enabled, for "inbox", it is disabled. I've got 
a temporary folder where html is preferred; I check my html mail in that 
folder. Since html is the preferred mode in this folder, hitting "r" for 
replying works fine.

In the non-html-preferred folders, hitting "r" displays html crap. Selecting 
html body part just shows the "this page has html, etc. etc., _view_ as 
html"... and then on clicking view, I get the html display. After this if I 
hit reply, the text in composer is fine.

I hope this answers this question and all of the below:

> If not enabled: Is it that the composer shows the HTML source even
> though the reader chose plain text? Is the plain text part empty (as is
> the case for some SPAM)?
>
> > for this, we'll have to explicitly select the
> > html body part, click on render it and then hit reply....
>
> Or do you want to tell us that you have HTML message that are labeled as
> text/plain and you want us to second-guess the given type and treat it
> as HTML?

I'll attach one such mail in some time.

Comment 6 Amit Shah 2003-10-07 14:01:42 UTC
Created attachment 2703 [details]
html mail message

this is a slightly edited mail that I have problems with while replying.
Comment 7 Marc Mutz 2003-10-07 14:54:59 UTC
Rephrasing the subject to refelct what we learned 
Comment 8 Marc Mutz 2003-10-11 13:20:37 UTC
I know what's going on, working with KHZ on a fix :-) 
Comment 9 kavol 2004-01-22 11:44:42 UTC
I wanted to send a bugreport but I've found this which seems to be the same problem, although the comments are a bit confusing for me ... so I'll try to resumarize:

* I got a multipart/alternative email
* since I prefer plaintext emails, only the text/plain part is shown (unless I manually select the other part)
* while viewing the text/plain part, I hit "r" to reply
* the composer shows up quoting the text/html part instead of text/plain part
* since I prefer plaintext in the composer, the html elements are not interpreted but rather show up in their source form - I have to delete them manually
* this behaviour I consider incorrect - I want to reply to the text/plain part, not to the text/html part (anyway, if a mail without text/plain part should come and be replied, I'd like the composer to strip the html elements automatically)

thankyou a lot in advance for fixing this

p.s. sorry for my English
Comment 10 Dominik Tritscher 2008-08-31 22:36:41 UTC
This problem still exists in version 1.10.0 installed from Kubuntu KDE4.1 packages.
Comment 11 Thomas McGuire 2009-02-22 21:37:02 UTC
> This problem still exists in version 1.10.0 installed from Kubuntu KDE4.1 packages.

I actually don't think so, at least my 1.11.90 here works fine, haven't heard about this problem at all. Assuming fixed, unless someone posts reproduction steps to make HTML tags appear in the composer.