Open Bug 1303323 Opened 9 years ago Updated 3 years ago

Thunderbird mangles HTML when generating replies as text

Categories

(Thunderbird :: Message Compose Window, enhancement)

enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: jon-bugzilla, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36 Steps to reproduce: Receive an HTML email with any links, email addresses or font formatting in it. Try to reply as text. Actual results: Thunderbird <mangles@the <mailto:mangles@the>> HTML with all sorts /of weird ASCII art/ like this http://example/<http://example/> which 1^st is *never useful* and 2^nd always /requires a lot of/ effort to _manually undo_ every time a reply is *written*. Expected results: For the love of bob please make it so you can reply to HTML and it will just take the plain text and set that as the initial quote for reply without all the mangling.
This is intentional. Links become: henk@henk.com.au <mailto:henk@henk.com.au> Bold becomes *bold*, underline become _underline_ and it takes care of lists, too. For me, this is a WONTFIX, Magnus?
Flags: needinfo?(mkmelin+mozilla)
It's clearly intentional, but it's just as clearly a misfeature. It is never useful behaviour, and it means the user must manually undo the mangling every single time they write a plain text reply. Surely at the very least adding an (advanced) option to turn it off would be trivial to implement?
As an example, this is what it looks like when you reply to an HTML message which has quoted a previous reply (I think maybe using Outlook): > *From: *"Agent Smith" <agent.smith@example.com <mailto:agent.smith@example.com>> > *Date: *Friday, 16 September 2016 at 12:46 > *To: *Mr Anderson <anderson@example.com <mailto:anderson@example.com>> > *Subject: *Your future You can't seriously tell me that that monstrosity is desired behaviour.
(In reply to Jon Ribbens from comment #3) > You can't seriously tell me that that monstrosity is desired behaviour. Yes, I can. Obviously this started out as: From: "Agent Smith" <agent.smith@example.com> where |From: | was in bold and someone had the brilliant idea to have a mailto-link inside the < >. We may be able to have a preference to suppresses the "smart plain text" conversion. I believe there is a conversion mode "raw" that could be used instead of "formatted". Given our current staff situation (all unpaid overworked and totally stressed volunteers), it's unlikely that anyone will work on that, so confirming the bug as enhancement or making it WONTFIX will come to the same. You are obviously free in supplying a patch yourself of pay someone to implement it for you. For the record, usage of "raw": https://dxr.mozilla.org/mozilla-central/rev/b401cb17167b34c362eb819259effbb3c0979f59/dom/base/nsPlainTextSerializer.cpp#813
Severity: normal → enhancement
Isn't there a hidden preference setting for that?
(In reply to rsx11m from comment #5) > Isn't there a hidden preference setting for that? Not that I know. I haven't looked where in the code we do the downgrade on <shift><reply> and whether there is any preference controlling that. Do you where that happens? Anyway, no reference to OutputRaw anywhere in C-C, so no. The "normal" code patch for sending is here: https://dxr.mozilla.org/comm-central/rev/c4a3561ecc3f9a5e8db41c904c144d71362007fa/mailnews/compose/src/nsMsgCompose.cpp#1297 and "formatted" is always true.
BenB may know.
Flags: needinfo?(ben.bucksch)
It's called structs. There are a number of prefs for it, converter.html2txt.structs in this case maybe?
Flags: needinfo?(mkmelin+mozilla)
Looks like it. That works partly: pref("converter.html2txt.structs", true); // Output structured phrases (strong, em, code, sub, sup, b, i, u) But link stuff can't be suppressed. As I said, there is no reference in C-C to OutputRaw, so there is no preference in C-C driving that. The call site to load an HTML message as plain text is here: https://dxr.mozilla.org/comm-central/rev/c4a3561ecc3f9a5e8db41c904c144d71362007fa/mailnews/mime/src/mimethpl.cpp#84
Flags: needinfo?(ben.bucksch)
converter.html2txt.structs=false does seem to help so that's half-way solved, thanks! :-)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.