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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user