PositiveTechnologies / AspxParser

Aspx files (aspx, ascx, etc.) parser.
MIT License
9 stars 8 forks source link

"Implicit" self-closing tags in HTML are not handled #15

Open wnayes opened 4 years ago

wnayes commented 4 years ago

ASP.NET understands certain HTML tags to be self-closing by definition, even if the programmer did not close the tag.

For example:

<meta charset="utf-8">
<meta http-equiv="refresh" content="">

With this parser, the above example will result in the bottom meta tag being a child of the top one.

This can be worked around as a consumer of the parser, although the behavior occurs as a surprise, without any indication other than an imbalanced parse tree.