AddDoctypeDecl should not enforce "doctype" being uppercase. Bug 197331, patch

by bugzilla@jellycan.com (Brodie Thiesfield), r=harishd, sr=jst
This commit is contained in:
bzbarsky%mit.edu 2003-03-17 23:24:27 +00:00
parent 170d69ea6e
commit bd5dec2fa1

View File

@ -3836,9 +3836,10 @@ HTMLContentSink::AddDocTypeDecl(const nsIParserNode& aNode)
}
// Cut out "<!DOCTYPE" or "DOCTYPE" from the name.
if (Substring(name, 0, 9).Equals(NS_LITERAL_STRING("<!DOCTYPE"))) {
nsCaseInsensitiveStringComparator ignoreCase;
if (Substring(name, 0, 9).Equals(NS_LITERAL_STRING("<!DOCTYPE"), ignoreCase)) {
name.Cut(0, 9);
} else if (Substring(name, 0, 7).Equals(NS_LITERAL_STRING("DOCTYPE"))) {
} else if (Substring(name, 0, 7).Equals(NS_LITERAL_STRING("DOCTYPE"), ignoreCase)) {
name.Cut(0, 7);
}