diff --git a/NEWS b/NEWS index e5588aeb..91e9a52a 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ + - added nl2br modifier to distribution (Monte) - added html_image to distribution (Monte) - - added cat modifier (Monte) + - added cat modifier to distribution (Monte) - added << >> <> support to if statments (SMK, Monte) - fix _assign_smarty_interface to not overwrite keys other than 'request' (Jerome Poudevigne, Monte) diff --git a/libs/plugins/modifier.nl2br.php b/libs/plugins/modifier.nl2br.php new file mode 100644 index 00000000..502e9cec --- /dev/null +++ b/libs/plugins/modifier.nl2br.php @@ -0,0 +1,25 @@ + + * Purpose: convert \r\n, \r or \n to
+ * Input: contents = contents to replace + * preceed_test = if true, includes preceeding break tags + * in replacement + * Example: {$text|nl2br} + * ------------------------------------------------------------- + */ +function smarty_modifier_nl2br($string) +{ + return nl2br($string); +} + +/* vim: set expandtab: */ + +?>