38194: screen out moz br, which was producing an extra newline in textareas

git-svn-id: svn://10.0.0.236/trunk@68460 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
2000-05-05 23:20:49 +00:00
parent ce149a6b13
commit ea28ffcd73
2 changed files with 12 additions and 4 deletions

View File

@@ -811,8 +811,12 @@ nsHTMLToTXTSinkStream::AddLeaf(const nsIParserNode& aNode)
}
else if (type == eHTMLTag_br)
{
// Do this even if we're not doing formatted output:
EnsureVerticalSpace(mEmptyLines+1);
// Another egregious editor workaround, see bug 38194:
// ignore the bogus br tags that the editor sticks here and there.
nsAutoString typeAttr;
if (NS_FAILED(GetValueOfAttribute(aNode, "type", typeAttr))
|| !typeAttr.EqualsWithConversion("_moz"))
EnsureVerticalSpace(mEmptyLines+1);
}
else if (type == eHTMLTag_whitespace)
{