129122: add a new serializer mode (used primarily by mail) in which

<br> tags within <pre> blocks are translated to newlines.
  r=nhotta,ducarroz,tmutreja sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@118645 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
2002-04-10 21:25:15 +00:00
parent 3d4b49a969
commit b8493d4a6b
3 changed files with 13 additions and 2 deletions

View File

@@ -427,6 +427,13 @@ nsHTMLContentSerializer::AppendElementStart(nsIDOMElement *aElement,
nsCOMPtr<nsIAtom> name;
content->GetTag(*getter_AddRefs(name));
if (name.get() == nsHTMLAtoms::br && mPreLevel > 0
&& (mFlags & nsIDocumentEncoder::OutputNoFormattingInPre)) {
AppendToString(mLineBreak, aStr);
mColPos = 0;
return NS_OK;
}
if (name.get() == nsHTMLAtoms::body) {
mInBody = PR_TRUE;
}