JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div id="test" data-title="<script>alert("Hello");</script>"></div>
</body>
JavaScript
$(document).ready(function(){
//alert($("#test").data("title"));
$("#test").append($("#test").data("title"));
});