Blame www/smarty/plugins/modifier.nl2br.php
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
/**
|
|
Chris PeBenito |
696b41 |
* Smarty plugin
|
|
Chris PeBenito |
696b41 |
* @package Smarty
|
|
Chris PeBenito |
696b41 |
* @subpackage plugins
|
|
Chris PeBenito |
696b41 |
*/
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
/**
|
|
Chris PeBenito |
696b41 |
* Smarty plugin
|
|
Chris PeBenito |
696b41 |
*
|
|
Chris PeBenito |
696b41 |
* Type: modifier
|
|
Chris PeBenito |
696b41 |
* Name: nl2br
|
|
Chris PeBenito |
696b41 |
* Date: Feb 26, 2003
|
|
Chris PeBenito |
696b41 |
* Purpose: convert \r\n, \r or \n to < >
|
|
Chris PeBenito |
696b41 |
* Input:
|
|
Chris PeBenito |
696b41 |
* - contents = contents to replace
|
|
Chris PeBenito |
696b41 |
* - preceed_test = if true, includes preceeding break tags
|
|
Chris PeBenito |
696b41 |
* in replacement
|
|
Chris PeBenito |
696b41 |
* Example: {$text|nl2br}
|
|
Chris PeBenito |
696b41 |
* @link http://smarty.php.net/manual/en/language.modifier.nl2br.php
|
|
Chris PeBenito |
696b41 |
* nl2br (Smarty online manual)
|
|
Chris PeBenito |
696b41 |
* @version 1.0
|
|
Chris PeBenito |
696b41 |
* @author Monte Ohrt <monte at ohrt dot com>
|
|
Chris PeBenito |
696b41 |
* @param string
|
|
Chris PeBenito |
696b41 |
* @return string
|
|
Chris PeBenito |
696b41 |
*/
|
|
Chris PeBenito |
696b41 |
function smarty_modifier_nl2br($string)
|
|
Chris PeBenito |
696b41 |
{
|
|
Chris PeBenito |
696b41 |
return nl2br($string);
|
|
Chris PeBenito |
696b41 |
}
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
/* vim: set expandtab: */
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
?>
|