bug fix for 81288 - &nbsp removed from source when changing views

r=kin@netscape.com
sr=sfraser@netscape.com
This commit is contained in:
anthonyd%netscape.com 2001-07-14 00:50:21 +00:00
Родитель 2133b79907
Коммит f88d5c6fa3
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -1530,8 +1530,14 @@ nsPlaintextEditor::OutputToString(nsAWritableString& aOutputString,
return rv;
}
nsAutoString charsetStr;
rv = GetDocumentCharacterSet(charsetStr);
if(NS_FAILED(rv) || charsetStr.IsEmpty())
charsetStr = NS_LITERAL_STRING("ISO-8859-1");
nsCOMPtr<nsIDocumentEncoder> encoder;
rv = GetAndInitDocEncoder(aFormatType, aFlags, NS_LITERAL_STRING(""), getter_AddRefs(encoder));
rv = GetAndInitDocEncoder(aFormatType, aFlags, charsetStr, getter_AddRefs(encoder));
if (NS_FAILED(rv))
return rv;
rv = encoder->EncodeToString(aOutputString);

Просмотреть файл

@ -1530,8 +1530,14 @@ nsPlaintextEditor::OutputToString(nsAWritableString& aOutputString,
return rv;
}
nsAutoString charsetStr;
rv = GetDocumentCharacterSet(charsetStr);
if(NS_FAILED(rv) || charsetStr.IsEmpty())
charsetStr = NS_LITERAL_STRING("ISO-8859-1");
nsCOMPtr<nsIDocumentEncoder> encoder;
rv = GetAndInitDocEncoder(aFormatType, aFlags, NS_LITERAL_STRING(""), getter_AddRefs(encoder));
rv = GetAndInitDocEncoder(aFormatType, aFlags, charsetStr, getter_AddRefs(encoder));
if (NS_FAILED(rv))
return rv;
rv = encoder->EncodeToString(aOutputString);