Closed Bug 1392064 Opened 7 years ago Closed 7 years ago

<pre wrap=""> added to HTML replies of non-flowed plaintext messages inhibits downgrade

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 57.0

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

References

Details

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #1385636 +++ From 1385636 comment #22: When you HTML-quote a plaintext message you get: <blockquote type="cite"> <pre wrap="">Hallo, And the fix [from bug 1385636] inhibits the downgrade to plaintext. So you answer plaintext adding plaintext and the sent result is HTML. Not good. I can't see right now who adds this, but I think we should add this as moz-* class.
Attached file Sample e-mail
Just import that message and do a HTML reply. Then send. Result: Not downgraded.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Adding a moz-* class to the pre let's us skip it when downgrading. Repeat the steps from comment #1 and it's downgraded again.
Attachment #8899238 - Flags: review?(acelists)
Problem only happens when replying to non-flowed messages, like the example attached here. Flowed messages don't use the <pre>. That why the fix is in mimetpla.cpp (MIME Text Plain), not mimetpfl.cpp (MIME Test Plain Flowed).
Summary: <pre wrap=""> added to HTML replies of plaintext messages inhibits downgrade → <pre wrap=""> added to HTML replies of non-flowed plaintext messages inhibits downgrade
Somehow I can't reproduce this. What kind of recipient do I need? I tried one that prefers plain text and the reply was automatically downgraded. I do see the <pre wrap=""> in the HTML composition before sending.
"Unknown" recipient, auto-downgrade. Doesn't downgrade the pre.
So with the patch on that "unknown preference" the downgrading dialog says the message can be converted without loosing information. Previously the dialog said that some formatting may be lost. Is that what I should see?
Yes. In Bug 1385636 <pre> was reclassified from nsIMsgCompConvertible::Plain to nsIMsgCompConvertible::Altering, so it might trigger that dialogue. Adding a class moz-* will lead to ignoring the <pre>, thus no dialogue should be triggered. I don't have the option "Ask me what to do", so it just silently sends as HTML, which is undesired.
Comment on attachment 8899238 [details] [diff] [review] 1392064-pre-with-class.patch (v1). Review of attachment 8899238 [details] [diff] [review]: ----------------------------------------------------------------- Ok, in that case it seems to work. Some time in the future we could look at that 'wrap' attribute which is ignored according to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre
Attachment #8899238 - Flags: review?(acelists) → review+
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/dcfbdc934514 Insert <pre> tags in quotes with class=moz-quote-pre to not inhibit auto-downgrade. r=aceman
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 57.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: