diff --git a/parser/htmlparser/src/CNavDTD.cpp b/parser/htmlparser/src/CNavDTD.cpp
index e6d649329b0..af7071d850b 100644
--- a/parser/htmlparser/src/CNavDTD.cpp
+++ b/parser/htmlparser/src/CNavDTD.cpp
@@ -904,13 +904,17 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
// wrong. So we collect the whole tag as misplaced in one
// gulp. Note that the tokenizer guarantees that there will
// be an end tag.
- while (aToken->GetTokenType() != eToken_end ||
- aToken->GetTypeID() != theTag) {
- aToken = NS_STATIC_CAST(CHTMLToken *, mTokenizer->PopToken());
- PushIntoMisplacedStack(aToken);
+ CToken *current = aToken;
+ while (current->GetTokenType() != eToken_end ||
+ current->GetTypeID() != theTag) {
+ current = NS_STATIC_CAST(CToken *, mTokenizer->PopToken());
+ NS_ASSERTION(current, "The tokenizer is not creating good "
+ "alternate tags");
+ PushIntoMisplacedStack(current);
}
- return result;
+ // XXX Add code to also collect incorrect attributes on the
+ // end tag.
}
if(DoesRequireBody(aToken,mTokenizer)) {
diff --git a/parser/htmlparser/src/nsElementTable.cpp b/parser/htmlparser/src/nsElementTable.cpp
index 0a81f2c8c62..6238b31c034 100644
--- a/parser/htmlparser/src/nsElementTable.cpp
+++ b/parser/htmlparser/src/nsElementTable.cpp
@@ -686,7 +686,7 @@ const nsHTMLElement gHTMLElements[] = {
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
/*autoclose starttags and endtags*/ 0,0,0,0,
/*parent,incl,exclgroups*/ kSpecial, (kSelf|kFlowEntity), kNone,
- /*special props, prop-range*/ kNoStyleLeaksIn|kRequiresBody, kNoPropRange,
+ /*special props, prop-range*/ kNoStyleLeaksIn, kNoPropRange,
/*special parents,kids,skip*/ 0,0,eHTMLTag_unknown,
/*contain-func*/ 0
},