I have the following markup:
<input id="displayBuffer" type="hidden">
<textarea id="about" rows="2" name="about" cols="20" aria-hidden="true"><p>test</p></textarea>
<input type="button" onclick="javascript:
$('#displayBuffer').val($('#about').html());
$('#displayAbout').html(unescape($('#displayBuffer').val()));"
name="Preview" value="Preview">
When the ‘preview’ button is clicked the div is populated with the content of the ‘about’ text area however it is not being encoded as HTML but it’s displaying <p>test</p> when I want it to display test with whatever style I have in CSS for p.
What am I doing wrong?
Something like the below should do it
DEMO
Hope this helps