JSFiddle - React, Tailwind, and code Playground

HTML

<h3>Neat-o Text Transformer</h3>
<div class="hint">Try inputing the string&quot;<span class="evil-input">Not Malicious at all&lt;script&gt;alert(&quot;hack'd&quot;);&lt;/script&gt;</span>&quot; and seeing what happens</div>
<textarea id="user-input" type="text" placeholder="Type Here!" rows="5" cols="100"></textarea>
<button type="button" id="go-btn" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Previous Set of Results">Display Result</button>
<div id="output"></div>

CSS

.hint {
    color: #777;
}

.evil-input {
    color: #B44;
}

JavaScript

$('#go-btn').click(function() {
    var userText = $('#user-input').val();
    var newHtml = '<div>' + userText + '</div>';
    $("#output").html(newHtml);
});