logo
Home XtGem- Templates- XtScript- bottom
Inserts HTML line breaks before all newlines in a string Newlines are NOT deleted
[...] = optional ... = your value
[var $... = ]call nl2br $val=...
Show in textarea
<!--parser:xtscript-->
var $input = {{
foo
bar
foo
bar}}
var $output = call nl2br $val=$input 
var $output = call htmlspecialchars $val=$output
print Input <pre>$input</pre><br />
print Output <pre>$output</pre>
<!--/parser:xtscript-->
Show in textarea
Reload
Input
foo
bar
foo
bar

Output
foo<br />
bar<br />
foo<br />
bar
Powered by XtGem
About us Contact Forum topÂ