bug 276637: Always parse comments in PCDATA in strict mode for better compatibilty with IE. Patch by Bastiaan Jacques <baafie@planet.nl>. r=mrbkap sr=peterv

This commit is contained in:
mrbkap%gmail.com 2005-03-23 06:14:10 +00:00
parent cda2b96b0e
commit 477b1e7c56

View File

@ -903,7 +903,11 @@ nsresult CTextToken::ConsumeParsedCharacterData(PRUnichar aChar,
// CCommentToken expects us to be on the '-'
aScanner.SetPosition(currPos.advance(2));
result = consumer.Consume(*currPos, aScanner, aFlag);
// In quirks mode we consume too many things as comments, so pretend
// that we're not by modifying aFlag.
result = consumer.Consume(*currPos, aScanner,
(aFlag & ~NS_IPARSER_FLAG_QUIRKS_MODE) | NS_IPARSER_FLAG_STRICT_MODE);
if (kEOF == result) {
return kEOF; // this can only happen if we're really out of space.
}