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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user