1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
5 * An open source application development framework for PHP 4.3.2 or newer
8 * @author ExpressionEngine Dev Team
9 * @copyright Copyright (c) 2008 - 2009, EllisLab, Inc.
10 * @license http://codeigniter.com/user_guide/license.html
11 * @link http://codeigniter.com
16 // ------------------------------------------------------------------------
19 * CodeIgniter Typography Helpers
21 * @package CodeIgniter
24 * @author ExpressionEngine Dev Team
25 * @link http://codeigniter.com/user_guide/helpers/typography_helper.html
28 // ------------------------------------------------------------------------
31 * Convert newlines to HTML line breaks except within PRE tags
37 if ( ! function_exists('nl2br_except_pre'))
39 function nl2br_except_pre($str)
41 $CI =& get_instance();
43 $CI->load->library('typography');
45 return $CI->typography->nl2br_except_pre($str);
49 // ------------------------------------------------------------------------
52 * Auto Typography Wrapper Function
57 * @param bool whether to reduce multiple instances of double newlines to two
60 if ( ! function_exists('auto_typography'))
62 function auto_typography($str, $reduce_linebreaks = FALSE)
64 $CI =& get_instance();
65 $CI->load->library('typography');
66 return $CI->typography->auto_typography($str, $reduce_linebreaks);
70 /* End of file typography_helper.php */
71 /* Location: ./system/helpers/typography_helper.php */