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

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

php - facebook and github login HWIOAuthBundle and FOSUserBundle in Symfony2.1 -

hadoop - Sqoop installation export and import from postgresql -