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

infinite looping.
r=nisheeth,jst
sr=vidur.


git-svn-id: svn://10.0.0.236/trunk@82243 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
2000-11-02 22:20:28 +00:00
parent ccb2185cdb
commit 049db120de
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