JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
JavaScript
var mytext = '<b>hello & world</b>';
var decoded = $('<div />').html(mytext).text();
$('div').html(decoded);
<div></div>
var mytext = '<b>hello & world</b>';
var decoded = $('<div />').html(mytext).text();
$('div').html(decoded);