After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353524 - tabs are lost when saving draft in text format
tabs are lost when saving draft in text format
Status: RESOLVED DUPLICATE of bug 237830
Product: evolution
Classification: Applications
Component: Mailer
2.8.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-08-30 09:53 UTC by Wang Xin
Modified: 2013-09-13 00:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
patch to make the composer do not save html section for TEXT format draft (883 bytes, patch)
2006-09-04 08:30 UTC, Wang Xin
none Details | Review
the patch to make evolution read the right section from drafts (2.96 KB, patch)
2006-09-04 08:32 UTC, Wang Xin
none Details | Review

Description Wang Xin 2006-08-30 09:53:32 UTC
Please describe the problem:
When saving the mail created in TEXT format, the TAB character is not exapnded in the HTML part of the mail

Steps to reproduce:
1. File - New - Mail Message
2. Insert the following example :
asdfasf
<tab key>tab
3. Then File - Save Draft
4. Check mail content in the Draft folder


Actual results:
tab is not expanded to spaces

Expected results:
the tab is expanded to spaces both in plain text and html mail part

Does this happen every time?
yes

Other information:
Let have a look to this mail :

--=-yPVV/KEBhA1hCIitYXEZ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

asdfasf
        tab

--=-yPVV/KEBhA1hCIitYXEZ
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.10.2">
</HEAD>
<BODY>
asdfasf<BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">-->    tab
</BODY>
</HTML>

--=-yPVV/KEBhA1hCIitYXEZ--
Comment 1 Karsten Bräckelmann 2006-08-30 19:21:36 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


Just as bug 242408, I believe this is another duplicate of bug 237830.

*** This bug has been marked as a duplicate of 237830 ***
Comment 2 Wang Xin 2006-08-31 06:21:15 UTC
I think this bug is not the same as bug 237830. Because all tabs are lost not only the first one.

When one save the draft as HTML format, the tabs will be expanded to spaces, so when the draft is opened again, the tabs will not be lost. But when one save the draft as TEXT format, the tabs will be left untouched as \t in both TEXT section and HTML section. But \t is not recognized by html engine, so when the draft is open again, the tabs will be lost.
Comment 3 Karsten Bräckelmann 2006-08-31 22:58:05 UTC
Yes, just as bug 242408, which is talking about tabs being converted into single spaces. It does not specifically talk about the tab being the first char.

Still, I believe this to be a duplicate of bug 237830. Despite the initial report, it turned out that whitespace handling is poor in general, when it comes to saving text/plain mails as Draft.

Marking as duplicate again. I'm going to add a few more words to that bug.


Wang, thanks for caring about the bug report! :)  If you still don't think that these bugs are the same issue, please feel free to re-open this bug.


*** This bug has been marked as a duplicate of 237830 ***
Comment 4 Wang Xin 2006-09-04 07:55:18 UTC
I think the cause is that tabs are ignored by html engine if
the mail is TEXT format(the draft will be saved as multipart/alternative). So
we have 3 solutions:

1.Do not save the mail in TEXT format as multipart/alternative, just save it as
plain text mail. In this case we have to make a little modification of
evolution.

2.When we read the draft, read the correct part from multipart mail. For TEXT
mail we read TEXT part, for HTML mail we read HTML part. In this case we have
to make modification of evolution too and it's a little more complicated. 

3.Make html engine expand tabs to nbsp. In this case we have to make
modification of gtkhtml, and it's complicated too.
Comment 5 Wang Xin 2006-09-04 08:30:00 UTC
Created attachment 72190 [details] [review]
patch to make the composer do not save html section for TEXT format draft
Comment 6 Wang Xin 2006-09-04 08:32:53 UTC
Created attachment 72191 [details] [review]
the patch to make evolution read the right section from drafts

patch for the 2nd solution