summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-09-12 09:22:21 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-09-12 09:22:21 +0200
commit9907df45d0003dee39480f4ea66004b2922b69c7 (patch)
treea3ff8a991b2e66113c83dbf11d9b11c3720d253e /system/helpers
parent08e38123f2b14b146f861c77c04073a3fc88c85d (diff)
Continued working on typography class and docs
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/typography_helper.php21
1 files changed, 3 insertions, 18 deletions
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);
}
}