Closed Bug 592819 Opened 14 years ago Closed 14 years ago

Messages with multipart/related always shown as html, even if mailnews.display.prefer_plaintext=true

Categories

(Thunderbird :: Message Reader UI, defect)

x86_64
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 253830

People

(Reporter: mozilla, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6

If a multipart/alternative message is composed of a text/plain part and a multipart/related part which is itself made up of a text/html part and another part (such as image/gif), then the mailnews.display.prefer_plaintext setting is ignored, and the multipart/related fork is displayed even if mailnews.display.prefer_plaintext is true

Reproducible: Always

Steps to Reproduce:
1. Set mailnews.display.prefer_plaintext to true using the Config Editor
2. Open msg-broken.eml (see attachment) using File->Open->SavedMessage

Actual Results:  
Html fork is shown (actually, the multipart/related fork, which contains the html part)

Expected Results:  
Plaintext fork should be shown
In bug summary:
> always shown as html
(In reply to comment #0)
> then the mailnews.display.prefer_plaintext setting is ignored, (snip)

What kind of phenomenon do you call "shown as html" or "setting is ignored"?
"test" in next text/html is shown in bold, even though "this is a test" in text/plain part?
> this is a <b>test</b>

If so, it's probably combination of next.
i) In "Plain Text" mode display, text which is converted from text/html part
   is used instead of text/plain part when mail structure of attached mail.
   Note: "Which part is used" depends on mail structure. It's known issue.
ii) In "HTML to text" conversion, with converter.html2txt.structs=true,
   <b>test</b> is converted to *test*.
iii) With mail.display_struct=true, *test* is shown in bold.
See next documents for Structured Text(plain text tag).
> http://www.python.org/community/sigs/current/doc-sig/stext/
> http://kb.mozillazine.org/Mail_and_news_settings

Check with appropriate test case to see which part is really used and to see shown in which mode, please.
(a) Different string in text/plain part and text/html part.
(b) Other tag. e.g. <div style="border:2px solid #000000;">this is a test</div>
Indeed, with your two suggested settings in ii) and iii), my test case becomes useless. I did not have these settings.

Attached is a test case which has TEXT in the text fork and HTML in the HTML fork (your suggestion a), which should not suffer from this problem. If everything was working correctly, the string HTML should never be shown if mailnews.display.prefer_plaintext setting is true, but it is.

Btw, your suggestion (b) of adding a border does not work either, as that border is not shown if html_as is different from 0.

Your suggestion (a) does work. Did you already try that yourself on your side? Did it show the problem?
Attached file Fixed "ok" test case
Dup of bug 253830. See also bugs listed in dependency tree for meta Bug 505172.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: