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


git-svn-id: svn://10.0.0.236/trunk@73771 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
2000-07-06 20:40:26 +00:00
parent b66b98f8a8
commit acf667a3db
2 changed files with 16 additions and 2 deletions

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: