fixed bug 1125

This commit is contained in:
rickg%netscape.com 1998-11-21 02:48:01 +00:00
parent 20641d86a2
commit cef7239ebd
2 changed files with 24 additions and 0 deletions

View File

@ -302,6 +302,18 @@ nsresult CEndToken::Consume(PRUnichar aChar, CScanner& aScanner) {
char buffer[300];
mTextValue.ToCString(buffer,sizeof(buffer)-1);
//This code was added to fix Bug#1125.
//The problem occurs in bad tags like this: </font size>.
//"font size" was being viewed as the tag, which of course doesn't exist.
//Instead, just look at the first word.
int theBufPos=-1;
while(buffer[++theBufPos]){
if(kSpace==buffer[theBufPos]){
buffer[theBufPos]=0;
break;
}
}
mTypeID= NS_TagToEnum(buffer);
if(NS_OK==result)

View File

@ -302,6 +302,18 @@ nsresult CEndToken::Consume(PRUnichar aChar, CScanner& aScanner) {
char buffer[300];
mTextValue.ToCString(buffer,sizeof(buffer)-1);
//This code was added to fix Bug#1125.
//The problem occurs in bad tags like this: </font size>.
//"font size" was being viewed as the tag, which of course doesn't exist.
//Instead, just look at the first word.
int theBufPos=-1;
while(buffer[++theBufPos]){
if(kSpace==buffer[theBufPos]){
buffer[theBufPos]=0;
break;
}
}
mTypeID= NS_TagToEnum(buffer);
if(NS_OK==result)