bug 294984: Make sure to create text and end tokens for tags such as <iframe>. This fixes a crash where CNavDTD assumed an end token was coming, but it wasn't. r+sr=bzbarsky a=chofmann

git-svn-id: svn://10.0.0.236/trunk@173675 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2005-05-22 00:57:37 +00:00
parent bc7f16557c
commit c0b86fcbd8

View File

@@ -793,17 +793,17 @@ nsresult nsHTMLTokenizer::ConsumeStartTag(PRUnichar aChar,
if (NS_FAILED(result)) {
aToken->SetInError(PR_TRUE);
// Note: We know here that the scanner is not incremental since if
// this peek fails, then we've already masked over a kEOF coming from
// the Consume() call above.
return NS_OK;
}
if(kGreaterThan != aChar) { // Look for a '>'
result = ConsumeAttributes(aChar, aToken, aScanner);
// Don't return early here so we can create a text and end token for
// the special <iframe>, <script> and similar tags down below.
result = NS_OK;
}
else {
aScanner.GetChar(aChar);
if(kGreaterThan != aChar) { // Look for a '>'
result = ConsumeAttributes(aChar, aToken, aScanner);
}
else {
aScanner.GetChar(aChar);
}
}
/* Now that that's over with, we have one more problem to solve.