nl2br - Inserts HTML line breaks before all newlines in a string
nl2br(string,is_xhtml = true)
Note: In the followings examples, the _ between the { should be removed to make it work.
in: res={_{nl2br("\n\ra\r\nb\rc\nd");}}. out: res=<br /> \ra<br />\r b<br />\rc<br /> d");. in: res={_{nl2br("\n\ra\r\nb\rc\nd",false);}}. out: res=<br> \ra<br>\r b<br>\rc<br> d");.
SEE ALSO
{{ include("includes/strings.sn") }}
Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>
1.0 2014-09-09 21:24:14 laplante@sednove.com
Edit© 2024 extenso Inc. All rights reserved.