JSFiddle - React, Tailwind, and code Playground

HTML

<div onclick="javascript:alert(&quot;XSS with encoded double quotes&quot;)">XSS with encoded double quotes</div>
<div onclick="javascript:alert(&apos;XSS with encoded single quotes&apos;)">XSS with encoded single quotes</div>
<div onclick="javascript:alert(&#039;XSS with differently encoded single quotes&#039;)">XSS with differently encoded single quotes</div>
<div onclick="javascript:alert('XSS with non-encoded single quotes')">XSS with non-encoded single quotes</div>