Bug 44564. Problems with internal subset, especially with view source XML. Also fixed CDATA section problems. Some cleanups. r=harishd, sr=vidur.

git-svn-id: svn://10.0.0.236/trunk@86136 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
heikki%netscape.com
2001-02-03 01:13:55 +00:00
parent 3e25d39c45
commit a4f8173ec8
32 changed files with 440 additions and 62 deletions

View File

@@ -925,12 +925,19 @@ nsresult nsHTMLTokenizer::ConsumeSpecialMarkup(PRUnichar aChar,CToken*& aToken,n
nsTokenAllocator* theAllocator=this->GetTokenAllocator();
if(theIndex==kNotFound) {
if('['==theBufCopy.CharAt(0))
if('['==theBufCopy.CharAt(0)) {
aToken = theAllocator->CreateTokenOfType(eToken_cdatasection,eHTMLTag_comment);
else aToken = theAllocator->CreateTokenOfType(eToken_comment,eHTMLTag_comment);
} else if (theBufCopy.EqualsWithConversion("ELEMENT",PR_FALSE,7) ||
theBufCopy.EqualsWithConversion("ATTLIST",PR_FALSE,7) ||
theBufCopy.EqualsWithConversion("ENTITY",PR_FALSE,6) ||
theBufCopy.EqualsWithConversion("NOTATION",PR_FALSE,8)) {
aToken = theAllocator->CreateTokenOfType(eToken_markupDecl,eHTMLTag_markupDecl);
} else {
aToken = theAllocator->CreateTokenOfType(eToken_comment,eHTMLTag_comment);
}
}
else
aToken = theAllocator->CreateTokenOfType(eToken_doctypeDecl,eHTMLTag_markupDecl);
aToken = theAllocator->CreateTokenOfType(eToken_doctypeDecl,eHTMLTag_doctypeDecl);
if(aToken) {
result=aToken->Consume(aChar,aScanner,mParseMode);