nl2br
Inserts HTML line breaks before all newlines in a string
Newlines are NOT deleted
[...] = optional ... = your value
[var $... = ]call nl2br $val=...
Example code
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 Example output
ReloadInput
foo
bar
foo
bar
Output
foo<br />
bar<br />
foo<br />
bar