small parser improvements to handle bad quotes better

This commit is contained in:
rickg@netscape.com
1998-11-03 00:55:33 +00:00
parent adf8fe6d48
commit 07a168d683
4 changed files with 10 additions and 2 deletions

View File

@@ -731,9 +731,13 @@ PRInt32 ConsumeQuotedString(PRUnichar aChar,nsString& aString,CScanner& aScanner
switch(aChar) {
case kQuote:
result=aScanner.ReadUntil(aString,kQuote,PR_TRUE);
if(kNoError==result)
aScanner.SkipOver(kQuote); //this code is here in case someone mistakenly adds multiple quotes...
break;
case kApostrophe:
result=aScanner.ReadUntil(aString,kApostrophe,PR_TRUE);
if(kNoError==result)
aScanner.SkipOver(kApostrophe); //this code is here in case someone mistakenly adds multiple apostrophes...
break;
default:
break;