Parse out the actual type from the content-type argument passed to

document.open().  Bug 295652, r+sr=jst, a=shaver
This commit is contained in:
bzbarsky%mit.edu 2005-06-01 15:33:44 +00:00
Родитель 67150fef30
Коммит a511b11a65
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -6453,7 +6453,9 @@ nsHTMLDocumentSH::DocumentOpen(JSContext *cx, JSObject *obj, uintN argc,
nsAutoString type;
type.Assign(nsDependentJSString(jsstr));
ToLowerCase(type);
if (!type.EqualsLiteral("text/html")) {
nsCAutoString actualType, dummy;
NS_ParseContentType(NS_ConvertUTF16toUTF8(type), actualType, dummy);
if (!actualType.EqualsLiteral("text/html")) {
contentType = "text/plain";
}
}