Closed Bug 279745 Opened 21 years ago Closed 17 years ago

(erroneous?) quote as block comment triggers plain text conversion warning

Categories

(MailNews Core :: MIME, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(4 files)

Steps to reproduce problem: 1. Find a plain text message that quotes another message 2. Reply to it in HTML format 3. Set your send format to auto-detect 4. Post your reply, but without adding your own formatting Expected result: reply posted Actual result: HTML conversion warning. This appears to be triggered by an HTML comment inserted by mimetpla.cpp
Attached patch Proposed patchSplinter Review
This works for me but then I don't understand why that code was there originally.
Assignee: sspitzer → neil.parkwaycc.co.uk
Status: NEW → ASSIGNED
Attachment #172343 - Flags: superreview?(bienvenu)
Attachment #172343 - Flags: review?(ben.bucksch)
As the comment says, I had a case where Gecko didn't put out a linebreak (after a quote when sender's text starts, I think), although it should have, and that fixed it. Maybe the bug has been fixed by now, but I don't know the exact probloem anymore to test it, and there are a variety of cases. Maybe I'll test it, when I get around to test bug 130728.
QA Contact: mime
Product: Core → MailNews Core
Neil, Ben, ping on this bug with a patch pending reviews.
(In reply to comment #3) > Neil, Ben, ping on this bug with a patch pending reviews. bienvenu too... fwiw, I just tested this patch and (yay!) it has not bitrotted over the last 4 years. :)
Attachment #172343 - Flags: superreview?(bienvenu) → superreview+
Attachment #172343 - Flags: review?(bugzilla)
Comment on attachment 172343 [details] [diff] [review] Proposed patch I couldn't trigger the error, but we shouldn't have to be doing this anyway, and if we do, it seems like a separate bug.
Attachment #172343 - Flags: review?(bugzilla) → review+
Pushed changeset 5210f1319bcd to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attached image Missing blank lines
And now blank lines between quoted and normal text are missing. *g* Left is without the patch and right with the patch.
If you use DOM Inspector to delete the comment nodes from the DOM generated by the previous version, do the blank lines disappear there too?
Sorry, i am not familiar with the DOM Inspector.
In that case, would you mind attaching the message, so that I have a known test case, and also let me know whether you are using any non-default preferences e.g. for disabling format=flowed.
Attached image Another case
Hm, you do not see this missing blank lines? The first screenshot was from a posting in de.comm.software.mozilla.nightly-builds, the second is from mozilla.dev.apps.seamonkey. <M66dnYPEQsLCIjLUnZ2dnUVZ_vSdnZ2d@mozilla.org> I assume that you have access to news.mozilla.org and can see this posting there. ;) My preferences, which may affect this bug: user_pref("mail.quoted_graphical", false); user_pref("mailnews.display.disable_format_flowed_support", true); user_pref("mail.quoteasblock", false);
Thanks Hartmut. That is *precisely* why the <!----> was there. The source code comment even says that, and I said it in comment 2. Please back out the patch until there's a better fix.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Severity: trivial → major
(In reply to comment #8) > If you use DOM Inspector to delete the comment nodes from the DOM generated by > the previous version, do the blank lines disappear there too? No. But without the comment node, the first #text inside the <pre> gets ripped of the leading empty line.
Attached patch Regression fixSplinter Review
So, philor pointed out the spec which shows that HTML eats newlines before and after tags. Most of the time this isn't a problem, because newlines usually get ignored anyway, but obviously in this one case we need to deliberately put a newline in to stop the HTML parser from eating into our data.
Attachment #366144 - Flags: review?(philringnalda)
Attachment #366144 - Flags: review?(philringnalda) → review?(bienvenu)
Ah, thanks! You're sure they should be there in all these cases? Please test with pref "mail.quoted_graphical" = true (default) and false, and with multiple quote levels. The other prefs mentioned should not have an influence. Test with a normal plaintext mail, *not* format-flowed as Thunderbird emits. (Testing f=f is useless in this bug, as f=f does not go through this class.)
(In reply to comment #15) > You're sure they should be there in all these cases? The point is that adding the \n in all cases leads to reproducible behaviour (i.e. it ceases to matter what the following data is.) > Please test with pref "mail.quoted_graphical" = true (default) and false, and > with multiple quote levels. Done. > The other prefs mentioned should not have an influence. > Test with a normal plaintext mail, *not* format-flowed as Thunderbird emits. > (Testing f=f is useless in this bug, as f=f does not go through this class.) Actually that is why the suggestion was to use user_pref("mailnews.display.disable_format_flowed_support", true); as then this code gets used even for f=f mail. user_pref("mailnews.quoteasblock") seems to affect replying in HTML format. user_pref("mailnews.quoted_graphical") only affects the display of the >s.
Attachment #366144 - Flags: review?(bienvenu) → review+
Pushed changeset dc17a79d4b83 to comm-central for the regression fix.
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Attachment #172343 - Flags: review?(ben.bucksch) → review-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: