Parse XML element names beginning with Valid NameChar

This commit is contained in:
Andrew Blackton 2017-09-11 14:00:11 -05:00 committed by Andrew Blackton
parent 951ed381a3
commit 5a50afe42c

View file

@ -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);