javascript - Converting a newline from JS to HTML with Node.js -


supposing have object data defined follows:

res.render('index', {     data: 'line one\nline two' }); 

how can render value in html (by using jade template engine) splitting text on 2 lines?

note: using \<br\> instead of \n, still doesn't work.

try

res.render('index', {     data: 'line 1 <br/> line two' }) 

and in index.jade

  != data 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -