Parse XML element names beginning with Valid NameChar
This commit is contained in:
parent
951ed381a3
commit
5a50afe42c
|
@ -2696,7 +2696,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
|
|||
|
||||
TY_(AddCharToLexer)(lexer, c);
|
||||
|
||||
if (TY_(IsLetter)(c))
|
||||
if (TY_(IsLetter)(c) || (cfgBool(doc, TidyXmlTags) && TY_(IsXMLNamechar)(c)))
|
||||
{
|
||||
lexer->lexsize -= 3;
|
||||
lexer->txtend = lexer->lexsize;
|
||||
|
@ -2897,7 +2897,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
|
|||
}
|
||||
|
||||
/* check for start tag */
|
||||
if (TY_(IsLetter)(c))
|
||||
if (TY_(IsLetter)(c) || (cfgBool(doc, TidyXmlTags) && TY_(IsXMLNamechar)(c)))
|
||||
{
|
||||
TY_(UngetChar)(c, doc->docIn); /* push back letter */
|
||||
TY_(UngetChar)('<', doc->docIn);
|
||||
|
|
Loading…
Reference in a new issue