Treat a "mime type" of "replace" as "text/html". Bug 313217, r+sr=jst

This commit is contained in:
bzbarsky%mit.edu 2005-10-27 02:39:18 +00:00
parent 0d5a3e6aa7
commit 6c4f2c04a1

View File

@ -7403,7 +7403,8 @@ nsHTMLDocumentSH::DocumentOpen(JSContext *cx, JSObject *obj, uintN argc,
ToLowerCase(type);
nsCAutoString actualType, dummy;
NS_ParseContentType(NS_ConvertUTF16toUTF8(type), actualType, dummy);
if (!actualType.EqualsLiteral("text/html")) {
if (!actualType.EqualsLiteral("text/html") &&
!type.EqualsLiteral("replace")) {
contentType = "text/plain";
}
}