load->library('typography'); return $CI->typography->nl2br_except_pre($str); } } // ------------------------------------------------------------------------ if (! function_exists('auto_typography')) { /** * Auto Typography Wrapper Function * * @param string $str * @param bool $reduce_linebreaks = FALSE whether to reduce multiple instances of double newlines to two * @return string */ function auto_typography($str, $reduce_linebreaks = false) { $CI = & get_instance(); $CI->load->library('typography'); return $CI->typography->auto_typography($str, $reduce_linebreaks); } } // -------------------------------------------------------------------- if (! function_exists('entity_decode')) { /** * HTML Entities Decode * * This function is a replacement for html_entity_decode() * * @param string * @param string * @return string */ function entity_decode($str, $charset = null) { return get_instance()->security->entity_decode($str, $charset); } }