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
Родитель 170d69ea6e
Коммит bd5dec2fa1
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -3836,9 +3836,10 @@ HTMLContentSink::AddDocTypeDecl(const nsIParserNode& aNode)
} }
// Cut out "<!DOCTYPE" or "DOCTYPE" from the name. // 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); 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); name.Cut(0, 7);
} }