Save the original tagname when viewing source to prevent case-folding. Bug

63137, r=choess, sr=heikki
This commit is contained in:
bzbarsky%mit.edu 2003-11-13 21:55:26 +00:00
parent 8a86410567
commit 13729d01dd
2 changed files with 12 additions and 4 deletions

View File

@ -215,7 +215,9 @@ nsresult CStartToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aFlag
nsAutoString theSubstr;
result=aScanner.GetIdentifier(theSubstr,PR_TRUE);
mTypeID = (PRInt32)nsHTMLTags::LookupTag(theSubstr);
if(eHTMLTag_userdefined==mTypeID) {
// Save the original tag string if this is user-defined or if we
// are viewing source
if(eHTMLTag_userdefined==mTypeID || (aFlag & NS_IPARSER_FLAG_VIEW_SOURCE)) {
mTextValue=theSubstr;
}
}
@ -328,7 +330,9 @@ nsresult CEndToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aFlag)
NS_ENSURE_SUCCESS(result, result);
mTypeID = (PRInt32)nsHTMLTags::LookupTag(theSubstr);
if(eHTMLTag_userdefined==mTypeID) {
// Save the original tag string if this is user-defined or if we
// are viewing source
if(eHTMLTag_userdefined==mTypeID || (aFlag & NS_IPARSER_FLAG_VIEW_SOURCE)) {
mTextValue=theSubstr;
}
}

View File

@ -215,7 +215,9 @@ nsresult CStartToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aFlag
nsAutoString theSubstr;
result=aScanner.GetIdentifier(theSubstr,PR_TRUE);
mTypeID = (PRInt32)nsHTMLTags::LookupTag(theSubstr);
if(eHTMLTag_userdefined==mTypeID) {
// Save the original tag string if this is user-defined or if we
// are viewing source
if(eHTMLTag_userdefined==mTypeID || (aFlag & NS_IPARSER_FLAG_VIEW_SOURCE)) {
mTextValue=theSubstr;
}
}
@ -328,7 +330,9 @@ nsresult CEndToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aFlag)
NS_ENSURE_SUCCESS(result, result);
mTypeID = (PRInt32)nsHTMLTags::LookupTag(theSubstr);
if(eHTMLTag_userdefined==mTypeID) {
// Save the original tag string if this is user-defined or if we
// are viewing source
if(eHTMLTag_userdefined==mTypeID || (aFlag & NS_IPARSER_FLAG_VIEW_SOURCE)) {
mTextValue=theSubstr;
}
}