string - \n doesnt make new line when display in html/page using sails -


Hello, would you like to know whether the string has its function for formatting string variables in html? I have this scenario ...

In my controller, I have a variable that has something like this:

  var str = "Pellentesque habitant \ r \ nmoribi Tristique Carnits at \ n NetWate and Nursed Firms AB Trapis \ Neigastas. ";   

When I display it as an html page, it will display plain in this form. (Only 1 paragraph)

  Learn about the inhabitants of Pentecost and find out about the works done by them.   

But see the source

  Find out about the residence of pendrestes,   

Looking for possible solutions, and found about underscore string () I have tried to do this so far, I am just thinking that without setting another there are other possible solutions.

Thank you

You get the white space: pre-rap or Newline Pvt. Will have equal access to appropriate. By default, line feeds in HTML text are only more white spots.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -