~desarrollokumbia/kumbia/0.5

« back to all changes in this revision

Viewing changes to library/smarty/plugins/modifier.nl2br.php

  • Committer: Joan Miquel
  • Date: 2008-11-07 01:12:54 UTC
  • Revision ID: joan@ubuntu-black-20081107011254-lc0jk82y3yg7jvpl
commit inicial para kumbia 0.5 RC1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Smarty plugin
 
4
 * @package Smarty
 
5
 * @subpackage plugins
 
6
 */
 
7
 
 
8
 
 
9
/**
 
10
 * Smarty plugin
 
11
 *
 
12
 * Type:     modifier<br>
 
13
 * Name:     nl2br<br>
 
14
 * Date:     Feb 26, 2003
 
15
 * Purpose:  convert \r\n, \r or \n to <<br>>
 
16
 * Input:<br>
 
17
 *         - contents = contents to replace
 
18
 *         - preceed_test = if true, includes preceeding break tags
 
19
 *           in replacement
 
20
 * Example:  {$text|nl2br}
 
21
 * @link http://smarty.php.net/manual/en/language.modifier.nl2br.php
 
22
 *          nl2br (Smarty online manual)
 
23
 * @version  1.0
 
24
 * @author   Monte Ohrt <monte at ohrt dot com>
 
25
 * @param string
 
26
 * @return string
 
27
 */
 
28
function smarty_modifier_nl2br($string)
 
29
{
 
30
    return nl2br($string);
 
31
}
 
32
 
 
33
/* vim: set expandtab: */
 
34
 
 
35
?>