Closed
Bug 83425
Opened 24 years ago
Closed 24 years ago
Old HTML->TXT converter used
Categories
(Core :: DOM: Serializers, defect)
Core
DOM: Serializers
Tracking
()
VERIFIED
FIXED
mozilla0.9.3
People
(Reporter: BenB, Assigned: anthonyd)
Details
(Keywords: regression, Whiteboard: [not in 0.9.2 branch])
Sometime during the move to nsPlainTextSerializer.cpp, an older revision of the
file nsHTMLToTXTSinkStream.cpp has been used.
A direct result, where I catched it, is that bug 52042 regressed, which caused
bug 32336 to regress.
The proof:
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/htmlparser/src/nsHTMLToTXTSinkStream.cpp>,
line 475 shows "moz-txt", which is correct. However, the current revision of
nsPlaintextSerializer.cpp (the predecessor)
<http://lxr.mozilla.org/mozilla/source/content/base/src/nsPlainTextSerializer.cpp#1565>
uses just "txt", which is the old version. this started with the first revision
of that file
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/base/src/nsPlainTextSerializer.cpp&rev=1.1>
(line 1435).
I don't know, which or how many other bugs regressed. Please check, which
revisions have been skipped and merge these changes into the newest version of
nsPlainTextSerializer.cpp.
| Reporter | ||
Updated•24 years ago
|
Keywords: mozilla0.9.2,
regression
Comment 2•24 years ago
|
||
Hmm...seems like nsHTMLToTXTSinkStream revision 3.87
(http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsHTMLToTXTSinkStream.cpp&root=/cvsroot&subdir=mozilla/htmlparser/src/Attic&command=DIFF_FRAMESET&rev1=3.86&rev2=3.87)
was excluded. There is a partial discrepancy between code in
nsPlainTextSerializer::AddToLine() and the equivalent modified code in
nsHTMLToTXTSinkStream revision 3.89
(http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsHTMLToTXTSinkStream.cpp&root=/cvsroot&subdir=mozilla/htmlparser/src/Attic&command=DIFF_FRAMESET&rev1=3.88&rev2=3.89),
but it's not clear to me whether the former is incorrect.
Akkana, since I'm no longer familiar with the specifics of this code, I think it
makes more sense for you to determine whether the changes should be made now.
I'll attach a patch with the missing modifications.
Comment 3•24 years ago
|
||
This seems to be the only modification missed:
Index: nsPlainTextSerializer.cpp
===================================================================
RCS file: /cvsroot/mozilla/content/base/src/nsPlainTextSerializer.cpp,v
retrieving revision 1.24
diff -u -r1.24 nsPlainTextSerializer.cpp
--- nsPlainTextSerializer.cpp 2001/04/26 19:32:56 1.24
+++ nsPlainTextSerializer.cpp 2001/06/01 22:17:14
@@ -1562,8 +1562,8 @@
nsAutoString value;
nsresult rv = GetAttributeValue(nsHTMLAtoms::kClass, value);
return (NS_SUCCEEDED(rv) &&
- (value.EqualsIgnoreCase("txt", 3) ||
- value.EqualsIgnoreCase("\"txt", 4)));
+ (value.EqualsIgnoreCase("moz-txt", 3) ||
+ value.EqualsIgnoreCase("\"moz-txt", 4)));
}
| Reporter | ||
Comment 4•24 years ago
|
||
vidur, the change you pasted is definitely needed, otherwise that will cause
bugs (see above).
> AddToLine
If I saw it correctly, bug 54016 was the reason for that change. Seems needed.
| Reporter | ||
Comment 5•24 years ago
|
||
vidur, in the above patch, you need to add 4 for the comparison-length numbers,
i.e. 7 and 8 instead of 3 and 4. Otherwise r=BenB.
| Reporter | ||
Comment 6•24 years ago
|
||
ping
| Reporter | ||
Comment 7•24 years ago
|
||
Nominating for nsBranch. Please excuse me, if I'm not allowed to do that.
Rationale:
This bug caused bug 32336 to regress. Have you seen that Mailnews sometimes
sends out the same URL 2 times (in plaintext). Fixing this bug will prevent that
in almost all cases.
Fixing this bug is very low risk. The change has already been made long ago and
it was just an accident that it has practically been backed out.
Keywords: nsBranch
Comment 8•24 years ago
|
||
Sorry for the delay on this. I'm looking for a response from Akkana on this,
since this is in her domain. Reassigning to her to get this in.
Assignee: vidur → akkana
Comment 9•24 years ago
|
||
You were waiting for me? I didn't know that ... I don't own the serializers
any more (Anthonyd does) but yes, of course we should restore code that got
stomped accidentally. Looks fine to me (with the correct comparison lengths) if
Ben says it's the right thing. r=akkana.
Assignee: akkana → vidur
Comment 10•24 years ago
|
||
The fix has been checked into the trunk. With the goal of making a case for
getting it into the branch to the PDT, Akanna and I tried to recreate the
symptoms described in bug 32336, but weren't able to. Ben, do you have any
thoughts on why the "double formatting" mentioned in bug 32336 doesn't happen
even without this fix?
Assignee: vidur → anthonyd
| Reporter | ||
Comment 11•24 years ago
|
||
Try the reproduction of bug 58527.
| Reporter | ||
Comment 12•24 years ago
|
||
What about the AddToLine change? (Sorry if that was resolved already.)
Comment 13•24 years ago
|
||
To me, it looks correct in the current nsPlaintextSerializer. The change was
added in v1.3 by jst, right after the split.
Comment 14•24 years ago
|
||
| Assignee | ||
Comment 15•24 years ago
|
||
resolving this bug as fixed. branch is closed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: [not in 0.9.2 branch]
Target Milestone: --- → mozilla0.9.3
Comment 16•24 years ago
|
||
Ben/bratell can you verify this and mark verified-fixed? thanks.
Keywords: mozilla0.9.2
| Reporter | ||
Comment 17•24 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•