nl2br
与えられた変数内の全ての改行文字を<br />タグに置換します。 これはphpのnl2br()関数と同義です。
例 5-13. nl2br
<?php
$smarty = new Smarty;
$smarty->assign('articleTitle', "Sun or rain expected\ntoday, dark tonight");
$smarty->display('index.tpl');
?>
index.tpl :
{$articleTitle|nl2br}
出力 :
Sun or rain expected<br />today, dark tonight