Merge pull request #595 from ablackton/fix/XmlElementNameParsing
Issue #594 - Parse XML element names beginning with Valid NameChar
This commit is contained in:
commit
cd9bb76caf
|
@ -2696,7 +2696,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
|
||||||
|
|
||||||
TY_(AddCharToLexer)(lexer, c);
|
TY_(AddCharToLexer)(lexer, c);
|
||||||
|
|
||||||
if (TY_(IsLetter)(c))
|
if (TY_(IsLetter)(c) || (cfgBool(doc, TidyXmlTags) && TY_(IsXMLNamechar)(c)))
|
||||||
{
|
{
|
||||||
lexer->lexsize -= 3;
|
lexer->lexsize -= 3;
|
||||||
lexer->txtend = lexer->lexsize;
|
lexer->txtend = lexer->lexsize;
|
||||||
|
@ -2897,7 +2897,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check for start tag */
|
/* 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)(c, doc->docIn); /* push back letter */
|
||||||
TY_(UngetChar)('<', doc->docIn);
|
TY_(UngetChar)('<', doc->docIn);
|
||||||
|
|
Loading…
Reference in a new issue