Closed Bug 1392064 Opened 2 years ago Closed 2 years ago

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


(Thunderbird :: Message Compose Window, defect)

Not set


(Not tracked)

Thunderbird 57.0


(Reporter: jorgk, Assigned: jorgk)




(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
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?

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
Attachment #8899238 - Flags: review?(acelists) → review+
Pushed by
Insert <pre> tags in quotes with class=moz-quote-pre to not inhibit auto-downgrade. r=aceman
Closed: 2 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.