I insert a variable containing the text with the characters of the line break \r\n (just \n ) (tried it <br/> ) using the LightnCandy template engine into the div block - as a result, the transfers do not work. Tell me how to solve the problem.

  • Code show that does not work as expected. - neluzhin
  • one
    at the output in html what happens? does not come out so that when outputting it escapes tags (xs what kind of template engine is this)? - teran

2 answers 2

on the div you need to add the style white-space:pre or white-space:pre-line question is not php but css refers

  • So the author also says that <br> used it, .. so maybe there is more a matter of that “wonderful” templating engine. - Roman Grinyov
  • wait, then, what to say - the author is in the studio :-) he needs 3 minutes to check his style - Eugene Bartosh
  • Thank. Added white-space: pre to div and earned \ r \ n - Dean Gray

Try with a space (html5) <br /> ;

Try without a space <br> ;

In php, the working example is echo '<a>Привет</a><br />' ;