JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<!--
data-field-a should be a parse error because
the character reference is missing the
semicolon at the end, and has no characters
after it.
data-field-b should be valid because
while missing the semicolon at the end, it's
followed by alphanumeric text in an attribute.
data-field-c should be a parse error because
it's a valid character reference minus the
ending semicolon followed by an equal sign
in an attribute.
data-field-d should be valid and is here as a baseline.
-->
<a
data-field-a="&"
data-field-b="&up"
data-field-c="&=error"
data-field-d="&"
id="link"
href="?something&=Amp"=Something">
Link
</a>
<ul>
<li>
<!-- Valid -->
&
</li>
<li>
<!-- Parse Error - Missing semicolon at the end -->
&
</li>
<li>
<!-- Parse Error - Same as prior, and not in attribute -->
&=blah
</li>
<li>
<!-- Parse Error - Same as prior -->
&edup
</li>
</ul>
</div>
<p>Open the Web Console for more output</p>
JavaScript
console.dir(link.dataset);