JSFiddle - React, Tailwind, and code Playground
HTML
<div onclick="javascript:alert("XSS with encoded double quotes")">XSS with encoded double quotes</div>
<div onclick="javascript:alert('XSS with encoded single quotes')">XSS with encoded single quotes</div>
<div onclick="javascript:alert('XSS with differently encoded single quotes')">XSS with differently encoded single quotes</div>
<div onclick="javascript:alert('XSS with non-encoded single quotes')">XSS with non-encoded single quotes</div>