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