Merge pull request #564 from htacg/issue-395
Issue 395 - self closing tags
This commit is contained in:
commit
e23f29b145
16
src/lexer.c
16
src/lexer.c
|
@ -3723,6 +3723,22 @@ static tmbstr ParseAttribute( TidyDocImpl* doc, Bool *isempty,
|
|||
if (TY_(IsWhite)(c))
|
||||
break;
|
||||
|
||||
if (c == '/') /* Issue #395 - potential self closing tag */
|
||||
{
|
||||
c = TY_(ReadChar)(doc->docIn); /* read next */
|
||||
if (c == '>')
|
||||
{
|
||||
/* got a self closing tag - put is back and continue... */
|
||||
TY_(UngetChar)(c, doc->docIn);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Not '/>' - put it back */
|
||||
TY_(UngetChar)(c, doc->docIn);
|
||||
}
|
||||
}
|
||||
|
||||
/* what should be done about non-namechar characters? */
|
||||
/* currently these are incorporated into the attr name */
|
||||
|
||||
|
|
Loading…
Reference in a new issue