Closed Bug 271312 Opened 20 years ago Closed 14 years ago

Tab in folded (wrapped) subject line displays incorrectly in thread pane (problematic HTAB==0x09 is used for header folding in Subject: header text)

Categories

(MailNews Core :: Backend, defect)

1.9.2 Branch
x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jhaar, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [fixed_by_Tb 3.2pre/Sm2.2pre])

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

E-mail headers are allowed to be wrapped - e.g. if they are too long.

However Thunderbird 0.9 doesn't appear to unwrap. I've noticed a fair amount of
e-mails to me now have these weird chars half-way through the Subject line
(directory pane). If I double-click on that message to bring it up into its own
window I then see "this is the           text" - where that whitespace might be
"\s\t".

Reproducible: Always
Steps to Reproduce:
1. Create by hand an e-mail with a Subject header with a continuation line
2. e.g "Subject: this is a\ttest"
3. view in Thunderbird

Actual Results:  
See "this is a[X]test" in directory pane, and "this is a       test" in message
pane.

Expected Results:  
Should have said "this is atest"?

Confirmed that Outlook views it as "this is atest" - i.e. the tab was removed as
it was a continuation char.
I can confirm this on Linux Thunderbird 0.7.3 (20040819).

According to RFC2822 section 2.2.3, a newline followed by whitespace should be
removed. The whitespace itself should NOT be removed.

However, certain other software seems to think that <newline><tab> should be
replaced with <space>. When Thunderbird displays such a message, it correctly
displays the tab as a small space in the message pane. But in the message list,
 it incorrectly displays an "NL" placeholder.

This does not happen with lines properly wrapped using <newline><space>, such as
are generated by Thunderbird itself.
*** Bug 278408 has been marked as a duplicate of this bug. ***
Confirming. I see this with TB 1.0 on windows XP. When a subject line is wrapped
in the message source, and the continued line is indented with a tab character,
the tab appears in the message list pane as a little filled rectangle.

When I double-click on the message to open it in a separate window, the title
bar of the window (based on the message subject) contains a little rectangle for
the tab character.

In the subject line of the preview pane or of the separate message window, the
tab appears as a wider-than-normal space.

The wider-than-normal space effect can also be reproduced in a trunk copy of TB
for solaris/gtk2, though the other two effects don't appear. 
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Summary: thunderbird 0.9 doesn't "unwrap" wrapped Subject lines → Tab in wrapped subject line displays incorrectly
Version: unspecified → 1.0
*** Bug 273096 has been marked as a duplicate of this bug. ***
Seamonkey bug 240924.

(In reply to comment #0)
> Expected Results:  
> Should have said "this is atest"?

As noted in comment 1, this is not the expected result; the whitespace is 
supposed to remain.
Summary: Tab in wrapped subject line displays incorrectly → Tab in folded (wrapped) subject line displays incorrectly in thread pane
It's failing (Mozilla 2005022009 Mac OS X) even if it's just a space, not a tab.  If there's one space 
(which is how Mozilla itself breaks lines) then it appears as three spaces in the thread pane and  
composition window, but only one space in the header of the message pane.

Should we make this part of this bug?
IMVHO, in this very specific case Thunderbird could break the RFC just a little 
and convert such tabs to spaces, because:

1) tabs in subject lines don't do much sense anyway,
2) those black boxes are ugly, and
3) almost everyone else use tabs to indent folded lines, because
   a) in just about all other fields, tabs and spaces are equivalent, and
   b) it increases readability.
*** Bug 288660 has been marked as a duplicate of this bug. ***
Depends on: 64948
*** Bug 310333 has been marked as a duplicate of this bug. ***
*** Bug 328536 has been marked as a duplicate of this bug. ***
I'm using Thunderbird 1.5.
The little rectangles still appear and make Thunderbird look unfinished and unprofessional.
Please convert these tabs characters by spaces as suggested by Magnus.
*** Bug 338737 has been marked as a duplicate of this bug. ***
I am seeing this problem using Thunderbird 1.5.0.5 on Windows XP.

In my case, mailman is what is indenting the wrapped subject lines with TAB characters. mailman is very popular software!

Here is a dump of an example message header:

0002020   C   c   :  sp  nl   S   u   b   j   e   c   t   :  sp   [   B
0002040   u   i   l   d   b   o   t   ]  sp   B   u   i   l   d   B   o
0002060   t  sp   S   U   C   C   E   S   S  nl  ht   (   B   l   d   _
0002100   g   s   s   d   k   _   g   s   s   d   k   _   t   e   s   t
0002120   _   2   0   0   6   _   0   9   _   1   2   _   0   0   _   0
0002140   1   _   0   0   _   I   n   c   r   e   m   e   n   t   a   l
0002160   _   2   )  nl   X   -   B   e   e   n   T   h   e   r   e   :

Given this issue still exists in Thunderbird 1.5.x, should the bug's version field be update to make this bug appear relevant?
*** Bug 331137 has been marked as a duplicate of this bug. ***
Me too.  This bug leads to the odd case that when you cut and paste the subject line it does not match the subject line.  Converting to a space would not violate the principle of least astonishment, IMHO.
*** Bug 359928 has been marked as a duplicate of this bug. ***
I have some messages with autowrapped subject and in which <nl><tab> should be removed and not replaced by a space. I don't know what the software is,
but I have this line in the headers:
X-Mailer: Internet Mail Service (5.5.2657.72)
I hope it helps.
*** Bug 363671 has been marked as a duplicate of this bug. ***
At the dupe, reporter notes that the odd character displays also in the preview text in the new message alert.
QA Contact: front-end
Not sure why RFC 2822 was recommended before, but RFC 822 is the one usually used for email standards.  Its section 3.1.1. "LONG HEADER FIELDS" talks about multiple whitespace characters being allowed, but does clearly state that the whitespace character should be honored during unfolding.

However, the pictogram version of the tab character (a right-arrow in my case) that I see in TBird is really annoying, and given the prominent use of tabs in header fields to indent "for looks" I would personally like see Thunderbird be consistent and display them as a single space in the list view like it does in the message preview pane and "view" window.
(In reply to comment #20)
> Not sure why RFC 2822 was recommended before

Probably because the third line in 2822 is "Obsoletes: 822"
That would be a good reason.  :)

Either way, my understanding of this ticket is mainly that there is inconsistent behavior in TBird.  The list displays the tab character visually as either a full tab or (in my case) an arrow character, and the message panes just treat it as any other old whitespace.
if i remember david correct, the message pane uses a slightly different source for the subject - semi related to bug 172104.  perhaps these bugs could be fixed at the same time?
Wow this bug is ancient.  It can't be that hard to fix; I mean it's just a header parser fix to strip out the \n\t.  

I can confirm that it is still annoying me in 2.0.0.6.

It might be fruitful to update in particular the 'version' label for the bug not to be ignored as out-of-date.
I can confirm another 800 users it's annoying (2.0.0.6)
It's even more annoying because we have mailman, and typically have longer Subject lines.

Please update the importance of this issue so it gets some attention! It's been years!
Using webkit now, this long-standing annoyance is no longer a problem... ;)
Assignee: mscott → nobody
Still in 2.0.0.17.  However this bug doesn't break threading view, even with subjects without the tab character, thank goodness.

Perhaps someone can just make a plugin to strip the subject?
FWIW, the same happens when you want save an attachment with a long, folded filename, e.g.

Content-Disposition: attachment; filename="this_is_a_very_long_filename_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxx
	_xxxx_xxxx.xxxxxx.image"

instead of stripping the tab, the file is saved as "this_is_a_very_long_filename_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxx<tab>_xxxx_xxxx.xxxxxx.image", which makes no sense whatsoever...

I really hope this get's fixed soon...
(In reply to comment #29)
> FWIW, the same happens when you want save an attachment with a long, folded
> filename, e.g.

i believe there is a different bug on that.
It is still here in thunderbird 3.0.3, though instead of showing the bad glyph trying to print the hard tab, the thread view just removes the tab, smashing the words before and after together.  It should replace the tab with a space, which is what happens when you open the message in its own tab.
Good Grief, how many years until this is fixed?
Blocks: 586981
No longer blocks: 467097
No longer blocks: 593337
Depends on: 593337
(In reply to comment #32)
> It is still here in thunderbird 3.0.3, though instead of showing the bad glyph
> the thread view just removes the tab, smashing the words before and after together.

It's Bug 553280(I dupe'ed to Bug 593337)/Bug 593337 for new phenomenon at thread pane with Tb 3.0(and Tb 3.1). See Bug 593337 Comment #15 for check result with trunk builds(Tb 3.2pre/Sm 2.2pre).
Next can be said.
1. This bug never occurs at thread pane after Tb 3.0(fixed by Tb 3.0),
   because Tab is removed upon Subject display at thread pane.
   And, by Tb 3.0, Bug 553280/Bug 593337 is generated.
2. Bug 553280/Bug 593337 is fixed by Tb 3.2pre/Sm 2.2 pre. 

(In reply to comment #29)
> FWIW, the same happens when you want save an attachment with a long, folded
> filename, (snip)

For "Wrong Tab for folding at mid of name/filename parameter value", see Bug 593337 Comment #14, and open separate bug if you believe it's still big problem, please. jh.mozilla@plonk.de, please keep "one problem per a bug".
Thank you!!! I've seen that this appears to be fixed in TB 3+ (on Linux). I really appreciate you addressing this issue.  Sweet!
Closing as WORKSFORME.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Summary: Tab in folded (wrapped) subject line displays incorrectly in thread pane → Tab in folded (wrapped) subject line displays incorrectly in thread pane (problematic HTAB==0x09 is used for header folding in Subject: header text)
Whiteboard: [fixed_by_Tb 3.2pre/Sm2.2pre]
Component: Mail Window Front End → Backend
Product: Thunderbird → MailNews Core
QA Contact: front-end → backend
Version: 1.0 → 1.9.2 Branch
You need to log in before you can comment on or make changes to this bug.