Bug 130045, make marked-section-like constructs close on greater than so that content generated by MS Word and some other tools works as expected. r=harishd, sr=vidur, a=asa.

git-svn-id: svn://10.0.0.236/trunk@117241 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
heikki%netscape.com
2002-03-22 22:58:36 +00:00
parent c0404bd5e2
commit e3e39244d4
2 changed files with 8 additions and 6 deletions

View File

@@ -825,11 +825,12 @@ nsresult CCDATASectionToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt3
mTextValue.Append(aChar);
result=aScanner.Peek(aChar); //then see what's next.
if((NS_OK==result) && (kRightSquareBracket==aChar)) {
result=aScanner.GetChar(aChar); //strip off the second ]
result=aScanner.GetChar(aChar); //strip off the second ]
mTextValue.Append(aChar);
result=aScanner.Peek(aChar); //then see what's next.
}
if((NS_OK==result) && (kGreaterThan==aChar)) {
nsAutoString dummy; // skip any bad data
result=aScanner.ReadUntil(dummy,kGreaterThan,PR_FALSE);
if (NS_OK==result) {
result=aScanner.GetChar(aChar); //strip off the >
done=PR_TRUE;
}