Right now void HTML elements like <br> and <img> are generated with closing tags when rendering to string or string builder. This is incorrect.
I'm about to push an ad-hoc fix that checks the tag against the list of known HTML void elements (it's finite) and renders them without the closing tag, but this doesn't scale because certain SVG and MathML elements are required to be self-closing like <circle />. We'll want a better way to deal with this than maintaining a list of hardcoded tags.
Right now void HTML elements like
<br>
and<img>
are generated with closing tags when rendering to string or string builder. This is incorrect.I'm about to push an ad-hoc fix that checks the tag against the list of known HTML void elements (it's finite) and renders them without the closing tag, but this doesn't scale because certain SVG and MathML elements are required to be self-closing like
<circle />
. We'll want a better way to deal with this than maintaining a list of hardcoded tags.