Closed Bug 1141786 Opened 10 years ago Closed 6 years ago

proper solution to bug 1125956 - In answers to plain text news articles or emails the line breaks are removed from the quotations WHEN parts of the original message were selected.

Categories

(MailNews Core :: Composition, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 68.0

People

(Reporter: mkmelin, Unassigned)

References

Details

+++ This bug was initially created as a clone of Bug #1125956 +++ Bug 1125956 comment 11: OK, so I finally built Thunderbird and debugged this myself. The msg compose code uses a copy encoder <http://mxr.mozilla.org/comm-central/source/mailnews/compose/src/nsMsgComposeService.cpp#479> in order to encode the current selection, but it also requires the field to be encoded as text/html, which is not really supported by nsHTMLCopyEncoder. Before the patch to bug 116083, we would get lucky and never get into the two conditions which could cause mIsTextWidget to become true, but now we actually look at the styles. Now, plaintext emails are displayed inside a <pre> element, so the new code will detect them as preformatted and will encode the selection as plaintext forcefully, which confuses the msg compose code. I tried just using nsDocumentEncoder but that doesn't work either. Ideally someone would fix this brokenness in Thunderbird, but who knows how much work that's going to be. :/ For now, I'm going to make Thunderbird not use any of this logic. --- So this bug is to solve this properly.
One approach would be to introduce a new nsIDocumentEncoder flag for the behavior that mailnews expects, pass that flag from the mailnews side and inside Gecko's nsHTMLCopyEncoder, look for the flag instead of the current build time flag.

I think this can be closed since bug 1174452 fixed the issue. The hack originally added for TB in bug 1125956 and later morphed in bug 1214377 has finally been removed in bug 1551707.

Fixed by bug 1174452 and bug 1551707.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 68.0
You need to log in before you can comment on or make changes to this bug.