JSFiddle - React, Tailwind, and code Playground

HTML

<input id="myinput" type="text" value="&quot;&gt;&lt;svg/onload=alert(3)&gt;">
    
    <div class="somediv"></div>

JavaScript

$(".somediv").html($("#myinput").val());