From 9907df45d0003dee39480f4ea66004b2922b69c7 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Fri, 12 Sep 2008 07:22:21 +0000 Subject: Continued working on typography class and docs --- system/helpers/typography_helper.php | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'system/helpers/typography_helper.php') diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index 2c5c588bc..11acea1f7 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -38,26 +38,11 @@ if ( ! function_exists('nl2br_except_pre')) { function nl2br_except_pre($str) { - $ex = explode("pre>",$str); - $ct = count($ex); + $CI =& get_instance(); - $newstr = ""; - for ($i = 0; $i < $ct; $i++) - { - if (($i % 2) == 0) - { - $newstr .= nl2br($ex[$i]); - } - else - { - $newstr .= $ex[$i]; - } + $CI->load->library('typography'); - if ($ct - 1 != $i) - $newstr .= "pre>"; - } - - return $newstr; + return $CI->typography->nl2br_except_pre($str); } } -- cgit v1.2.3-24-g4f1b