Bug 312025 - unnecessary HTML code is added to e-mail
Summary: unnecessary HTML code is added to e-mail
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.11 rc2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-21 08:51 UTC by Silver Salonen
Modified: 2017-01-07 21:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test-message's body part in HTML (1.56 KB, text/html)
2012-12-21 09:09 UTC, Silver Salonen
Details
original composition in kmail 4.10.1 (2.70 KB, application/mbox)
2013-03-10 04:43 UTC, Mark
Details
composed reply in Thunderbird (3.20 KB, application/x-extension-eml)
2013-03-10 04:44 UTC, Mark
Details
reply as received by kmail (5.60 KB, application/mbox)
2013-03-10 04:45 UTC, Mark
Details
reply composed in Windows Live Mail (3.86 KB, application/x-extension-eml)
2013-03-10 05:20 UTC, Mark
Details
Original as composed in KMail (55.27 KB, image/jpeg)
2013-03-11 12:42 UTC, Mark
Details
Reply as received from Thunderbird (47.12 KB, image/jpeg)
2013-03-11 12:43 UTC, Mark
Details
Reply as received from Windows Mail (52.18 KB, image/jpeg)
2013-03-11 12:43 UTC, Mark
Details
HTML-reply to a simple HTML email (117.88 KB, image/png)
2013-03-21 13:10 UTC, Silver Salonen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Silver Salonen 2012-12-21 08:51:36 UTC
When I send some long line from KMail and reply comes from Thunderbird, the line is split into multiple lines although there is no character limit for line length.
Replies from eg. MS Outlook look fine though. The long line looks OK in both Thunderbird message viewer and reply composer.
But I guess there is something that is inserted in the HTML-contents as it's broken every time after getting a reply from Thunderbird.

Example, I copy-pasted from this very page one line and replied to it from Thunderbird.
Origitanl contents:
=====
If your bug isn't there, search KDE Bugtracking System by entering a few key words having to do with your bug in this box. For example: pop3 mail or copy paste. The results will appear above.

--
Silver
=====

Contents after Mozilla Thunderbird's reply:
=====

On 21.12.2012 10:42, Silver Salonen wrote:
If your bug isn't there, search KDE
          Bugtracking System by entering a few key words having to do
          with your bug in this box. For example: pop3 mail or copy paste. The
          results will appear above.

--
Silver
=====

Reproducible: Always

Steps to Reproduce:
1. Write a HTML-email from KMail
2. Open that e-mail in Thunderbird and reply to it
Actual Results:  
Long lines get split up

Expected Results:  
Contents should stay as it was originally.
Comment 1 Laurent Montel 2012-12-21 09:01:03 UTC
I don't understand.
you report me a bug about thunderbird ?
Comment 2 Silver Salonen 2012-12-21 09:09:20 UTC
Created attachment 75954 [details]
test-message's body part in HTML
Comment 3 Silver Salonen 2012-12-21 09:09:48 UTC
My guess is this is a bug in KMail's composer, but it appears only in Mozilla Thunderbird, maybe also in some other e-mail client which I haven't just seen yet :)

I attached HTML-part of the original test-message that was built by KMail - it looks like there are some strage HTML-code in there..
Comment 4 Mark 2013-03-10 04:17:06 UTC
I can confirm I see exactly as described in the initial bug report.
However, the bug has nothing to do with Thunderbird at all. I think it is just a coincidence that the replies the reporter is seeing are from people using Thunderbird.

What happens is an html mail is composed in KMail ( I have seen this in both 4.8.xx, 4.9.xx and 4.10.xx versions of kmail)

The mail is displayed correctly by the receiving client. When they reply the mail is displayed correctly in the client they are composing in but once received by kmail - the original text (now quoted text) has strange line breaks - as can be seen in the original bug report above.
-----------------------------------------------------------------------------------------------------------------------
e.g.
Original html mail composed in kmail

Hello. How are you. It's nice to meet you.


Quoted reply when received back in kmail

Hello. How are
                 you. It's nice to meet you.

------------------------------------------------------------------------------------------------------------

I have seen this in replies sent to kmail from multiple email clients - so I think the bug is probably in the original composed html email.
Comment 5 Mark 2013-03-10 04:43:35 UTC
Created attachment 77901 [details]
original composition in kmail 4.10.1

original composition in kmail 4.10.1
Comment 6 Mark 2013-03-10 04:44:54 UTC
Created attachment 77902 [details]
composed reply in Thunderbird

reply to mail as composed in Thunderbird. Same page breaks occur in Apple Mail and Windows Mail.
Comment 7 Mark 2013-03-10 04:45:31 UTC
Created attachment 77903 [details]
reply as received by kmail

reply as received by kmail
Comment 8 Mark 2013-03-10 05:20:35 UTC
Created attachment 77904 [details]
reply composed in Windows Live Mail

Here is a reply to the same email but this time composed in Windows Live Mail.
As you can see - the page breaks occur in different places to that composed in Thunderbird - but there should be no page breaks at all.
Comment 9 Laurent Montel 2013-03-11 08:56:16 UTC
I prefere screenshots :)
But Ok will look at.
Comment 10 Mark 2013-03-11 12:42:51 UTC
Created attachment 77948 [details]
Original as composed in KMail

Here you go. Images as preferred :-)
Comment 11 Mark 2013-03-11 12:43:22 UTC
Created attachment 77949 [details]
Reply as received from Thunderbird
Comment 12 Mark 2013-03-11 12:43:57 UTC
Created attachment 77950 [details]
Reply as received from Windows Mail
Comment 13 Mark 2013-03-11 12:45:04 UTC
For the original email message I simply copied some text from a news website and pasted it into KMail as unformatted text. Then I simply made the heading BOLD and then sent.
Comment 14 Laurent Montel 2013-03-11 12:52:13 UTC
thanks :)
Will look at.
Comment 15 Silver Salonen 2013-03-21 13:05:14 UTC
Similar thing happens also when replying (with HTML formatting) to e-mails. In this case some line breaks are lost on quoting.
I'll attach one of these cases where the text is quite minimal. In this case the original HTML is:
--047d7ba9830287c2bb04d86ea8e4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><br clear=3D"all"></div>Mingi Firma AS aadressi ei=
 leia tabelitest, suhtle nendega ise<br><br><br><br><div>-- <br>lugupidamis=
ega,<div>Minu Firma O=DC</div>
</div></div>

--047d7ba9830287c2bb04d86ea8e4--

After my reply it is:
--nextPart2176885.LFTFGTejPQ
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/=
REC-html40/strict.dtd">
<html><head><meta name=3D"qrichtext" content=3D"1" /><style type=3D"tex=
t/css">
p, li { white-space: pre-wrap; }
</style></head><body style=3D" font-family:'Sans Serif'; font-size:11pt=
; font-weight:400; font-style:normal;">
<p style=3D" margin-top:0px; margin-bottom:0px; margin-left:0px; margin=
-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Rep=
ly.<br /><br />--<br />Silver<br /><br />On Thursday 21 March 2013 14:4=
1:32 Minu Firma O=C3=9C wrote:<br /></p>
<p style=3D" margin-top:12px; margin-bottom:0px; margin-left:40px; marg=
in-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">=
<br /></p>
<p style=3D" margin-top:0px; margin-bottom:0px; margin-left:0px; margin=
-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Mingi Firma AS aadressi ei leia tabelitest, suhtle nendega ise<br /><br=
 /><br /><br /></p>
<p style=3D" margin-top:0px; margin-bottom:0px; margin-left:40px; margi=
n-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-=
- <br />lugupidamisega,</p>
<p style=3D" margin-top:0px; margin-bottom:0px; margin-left:40px; margi=
n-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Minu Firma O=C3=9C</p>
<p style=3D" margin-top:0px; margin-bottom:0px; margin-left:0px; margin=
-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br=
 /></p></body></html>
--nextPart2176885.LFTFGTejPQ--
Comment 16 Silver Salonen 2013-03-21 13:10:53 UTC
Created attachment 78264 [details]
HTML-reply to a simple HTML email
Comment 17 Mark 2013-07-29 02:42:32 UTC
it's been a while. Any movement on this bug?
Comment 18 Silver Salonen 2013-07-30 06:17:09 UTC
Still happens in KMail 4.11 RC2.
Comment 19 Laurent Montel 2013-07-30 07:03:03 UTC
We need to generate by hand html and not use QTextDocument::generateHtml...
Not easy to support all feature.
Will look at.
Comment 20 Denis Kurz 2016-09-24 18:00:01 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 21 Denis Kurz 2017-01-07 21:28:12 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.