40809 ( nsbeta2+ ) - Replace "\r\n" with "\n" and CR with LF instead of stripping off CRs altogether - in view source.

r=dbaran@fas.harvard.edu
This commit is contained in:
harishd@netscape.com
2000-07-06 20:40:26 +00:00
parent 062d87bd05
commit db74c8ad11
2 changed files with 16 additions and 2 deletions
+8 -1
View File
@@ -1035,7 +1035,14 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) {
result=WriteTagWithError(mText,aToken,aToken->GetAttributeCount(),PR_FALSE);
}
}
else result=WriteTag(mText,aToken,aToken->GetAttributeCount(),PR_TRUE);
else {
// Fix bug 40809
nsString& theStr=aToken->GetStringValueXXX();
theStr.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r\n"), NS_ConvertASCIItoUCS2("\n"));
theStr.ReplaceChar(kCR,kLF);
result=WriteTag(mText,theStr,aToken->GetAttributeCount(),PR_TRUE);
}
break;
case eToken_entity: