$('.click').click(function(){
var t = 'hello /n world';
$('.target').text(t);
});
I have a button, it replaces the line after the click.
if I use text(), it converts the entire string to htmlentites, and I cannot continue breaking the string
if i use html()i will get xss attack)
(var t should be extracted from the database from text data)
any suggestion?
source
share