Bug 163039, relax sanity check on XML serializer so that we won't throw an error if the serialized document is not XML. This is needed because Bugzilla (at least) abuses XMLSerializer (to edit attachments). r=sicking, sr=jst.

This commit is contained in:
heikki%netscape.com 2002-08-16 23:24:15 +00:00
Родитель 5771e037cf
Коммит 2fa45fa451
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -764,7 +764,9 @@ nsXMLContentSerializer::AppendDocumentStart(nsIDOMDocument *aDocument,
NS_ENSURE_ARG_POINTER(aDocument);
nsCOMPtr<nsIXMLDocument> xml(do_QueryInterface(aDocument));
NS_ENSURE_TRUE(xml, NS_ERROR_UNEXPECTED);
if (!xml) {
return NS_OK;
}
nsAutoString version, encoding, standalone;
xml->GetXMLDeclaration(version, encoding, standalone);