58455 - Catch BadLiteralString error for unmatched quote on the attribute name to avoid

infinite looping.
r=nisheeth,jst
sr=vidur.
This commit is contained in:
harishd@netscape.com
2000-11-02 22:20:28 +00:00
parent c7b96da9ac
commit 67b260ee80
2 changed files with 14 additions and 0 deletions

View File

@@ -1385,6 +1385,13 @@ nsresult CAttributeToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 a
if(NS_OK==result) {
mTextKey.Append(aChar);
result=ConsumeQuotedString(aChar,mTextKey,aScanner);
if(result==kBadStringLiteral) {
// Ref. Bug: 58455
// If you're here it means that we have searched all the way thro'
// the document for a matching quote and haven't found it. Tell the
// caller that we are done searching and proceed with whatever we have.
result=NS_OK;
}
if(!aRetainWhitespace)
mTextKey.StripChars("\r\n"); //per the HTML spec, ignore linefeeds...
}//if