Fixed percolation of nbsp's into the transformed buffer (bug 16886)

This commit is contained in:
kipp%netscape.com 1999-10-21 20:47:36 +00:00
Родитель 5ff3bcc409
Коммит a74943d540
2 изменённых файлов: 30 добавлений и 0 удалений

Просмотреть файл

@ -206,6 +206,9 @@ nsTextTransformer::ScanNormalAsciiText_F(PRInt32* aWordLen)
if (XP_IS_SPACE(ch)) {
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (bp == endbp) {
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
nsresult rv = mTransformBuf.GrowBy(1000);
@ -336,6 +339,9 @@ nsTextTransformer::ScanPreData_F(PRInt32* aWordLen)
if ((ch == '\t') || (ch == '\n')) {
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (ch > MAX_UNIBYTE) mHasMultibyte = PR_TRUE;
if (bp == endbp) {
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
@ -371,6 +377,9 @@ nsTextTransformer::ScanPreAsciiData_F(PRInt32* aWordLen)
cp--;
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (bp == endbp) {
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
nsresult rv = mTransformBuf.GrowBy(1000);
@ -517,6 +526,9 @@ nsTextTransformer::ScanNormalAsciiText_B(PRInt32* aWordLen)
if (XP_IS_SPACE(ch)) {
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (bp == startbp) {
PRInt32 oldLength = mTransformBuf.mBufferLen;
nsresult rv = mTransformBuf.GrowBy(1000);
@ -643,6 +655,9 @@ nsTextTransformer::ScanPreData_B(PRInt32* aWordLen)
if ((ch == '\t') || (ch == '\n')) {
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (ch > MAX_UNIBYTE) mHasMultibyte = PR_TRUE;
if (bp == startbp) {
PRInt32 oldLength = mTransformBuf.mBufferLen;

Просмотреть файл

@ -206,6 +206,9 @@ nsTextTransformer::ScanNormalAsciiText_F(PRInt32* aWordLen)
if (XP_IS_SPACE(ch)) {
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (bp == endbp) {
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
nsresult rv = mTransformBuf.GrowBy(1000);
@ -336,6 +339,9 @@ nsTextTransformer::ScanPreData_F(PRInt32* aWordLen)
if ((ch == '\t') || (ch == '\n')) {
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (ch > MAX_UNIBYTE) mHasMultibyte = PR_TRUE;
if (bp == endbp) {
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
@ -371,6 +377,9 @@ nsTextTransformer::ScanPreAsciiData_F(PRInt32* aWordLen)
cp--;
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (bp == endbp) {
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
nsresult rv = mTransformBuf.GrowBy(1000);
@ -517,6 +526,9 @@ nsTextTransformer::ScanNormalAsciiText_B(PRInt32* aWordLen)
if (XP_IS_SPACE(ch)) {
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (bp == startbp) {
PRInt32 oldLength = mTransformBuf.mBufferLen;
nsresult rv = mTransformBuf.GrowBy(1000);
@ -643,6 +655,9 @@ nsTextTransformer::ScanPreData_B(PRInt32* aWordLen)
if ((ch == '\t') || (ch == '\n')) {
break;
}
if (CH_NBSP == ch) {
ch = ' ';
}
if (ch > MAX_UNIBYTE) mHasMultibyte = PR_TRUE;
if (bp == startbp) {
PRInt32 oldLength = mTransformBuf.mBufferLen;