fixed DTD selection bugs; entity bugs; conditionally enabled Strict DTD

This commit is contained in:
rickg@netscape.com
2000-04-17 06:33:31 +00:00
parent 965884c255
commit 9c23f5c8bc
32 changed files with 4784 additions and 4086 deletions

View File

@@ -248,7 +248,7 @@ nsresult CStartToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode
}
}
else {
mTextValue.AssignWithConversion(aChar);
mTextValue.Assign(aChar);
result=aScanner.ReadIdentifier(mTextValue);
mTypeID = nsHTMLTags::LookupTag(mTextValue);
}
@@ -1477,7 +1477,7 @@ PRInt32 CWhitespaceToken::GetTokenType(void) {
* @return error result
*/
nsresult CWhitespaceToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode) {
mTextValue.AssignWithConversion(aChar);
mTextValue.Assign(aChar);
nsresult result=aScanner.ReadWhitespace(mTextValue);
if(NS_OK==result) {
mTextValue.StripChar(kCR);
@@ -1522,7 +1522,7 @@ CEntityToken::CEntityToken(const nsString& aName) : CHTMLToken(aName) {
*/
nsresult CEntityToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode) {
if(aChar)
mTextValue.AssignWithConversion(aChar);
mTextValue.Assign(aChar);
nsresult result=ConsumeEntity(aChar,mTextValue,aScanner);
return result;
}
@@ -1688,7 +1688,7 @@ PRInt32 CEntityToken::TranslateToUnicodeStr(nsString& aString) {
value = nsHTMLEntities::EntityToUnicode(mTextValue);
if(-1<value) {
//we found a named entity...
aString.AssignWithConversion(PRUnichar(value));
aString.Assign(PRUnichar(value));
}
}//else
}//if