I have:
<input type="text" value="Raphaël\nkicks\nbutt!" id="tzbox_txt">
var inputText = $("#tzbox_txt").val();
var stringText = "Raphaël\nkicks\nbutt!"
inputText === stringText - false!
If I use $(input).val()
I get "Raphaël\nkicks\nbutt!"
where \n
is not being interpreted as line breaks.
And if I do var text = "Raphaël\nkicks\nbutt!"
it is being escaped and text shows with line breaks.
How do I make input text value to be interpreted with line breaks?