fix 76689. r=harishd sr=blizzard

fix non-ASCII xml element name display in the end tag at xml view source


git-svn-id: svn://10.0.0.236/trunk@94658 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ftang%netscape.com
2001-05-11 14:39:17 +00:00
parent 53442aec1a
commit 936a64c40e
2 changed files with 8 additions and 2 deletions

View File

@@ -504,7 +504,10 @@ nsresult nsHTMLTokenizer::ConsumeTag(PRUnichar aChar,CToken*& aToken,nsScanner&
result=aScanner.Peek(theNextChar, 1);
if(NS_OK==result) {
if(nsCRT::IsAsciiAlpha(theNextChar)||(kGreaterThan==theNextChar)) {
// xml allow non ASCII tag name, consume as end tag. need to make xml view source work
PRBool isXML=((eXMLText==mDocType) || (eXHTMLText==mDocType));
if(nsCRT::IsAsciiAlpha(theNextChar)||(kGreaterThan==theNextChar)||
(isXML && (! nsCRT::IsAscii(theNextChar)))) {
result=ConsumeEndTag(aChar,aToken,aScanner);
}
else result=ConsumeComment(aChar,aToken,aScanner);