зеркало из https://github.com/mozilla/gecko-dev.git
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.
This commit is contained in:
Родитель
1bfada14c9
Коммит
3958edb4ee
|
@ -825,11 +825,12 @@ nsresult CCDATASectionToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt3
|
||||||
mTextValue.Append(aChar);
|
mTextValue.Append(aChar);
|
||||||
result=aScanner.Peek(aChar); //then see what's next.
|
result=aScanner.Peek(aChar); //then see what's next.
|
||||||
if((NS_OK==result) && (kRightSquareBracket==aChar)) {
|
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);
|
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 >
|
result=aScanner.GetChar(aChar); //strip off the >
|
||||||
done=PR_TRUE;
|
done=PR_TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -825,11 +825,12 @@ nsresult CCDATASectionToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt3
|
||||||
mTextValue.Append(aChar);
|
mTextValue.Append(aChar);
|
||||||
result=aScanner.Peek(aChar); //then see what's next.
|
result=aScanner.Peek(aChar); //then see what's next.
|
||||||
if((NS_OK==result) && (kRightSquareBracket==aChar)) {
|
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);
|
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 >
|
result=aScanner.GetChar(aChar); //strip off the >
|
||||||
done=PR_TRUE;
|
done=PR_TRUE;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче