summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-09-11 22:11:59 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-09-11 22:11:59 +0200
commit5574110c817aa1f9c5c71e1b7cffedb69baf7457 (patch)
treebb52c01153bcd6a7b3cc3ae6ee76440eb80ac40a /system
parent50500a27df17d60d87ce89eca64c644124c64bdc (diff)
Tweaked the auto_typography function
Diffstat (limited to 'system')
-rw-r--r--system/helpers/typography_helper.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index ce628115a..f0dd6fd90 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -69,16 +69,21 @@ if ( ! function_exists('nl2br_except_pre'))
*
* @access public
* @param string
+ * @param bool whether to allow javascript event handlers
+ * @param bool whether to reduce multiple instances of double newlines to two
* @return string
*/
if ( ! function_exists('auto_typography'))
{
- function auto_typography($str)
+ function auto_typography($str, $allow_event_handlers = FALSE, $reduce_empty_lines = FALSE)
{
$CI =& get_instance();
$CI->load->library('typography');
+ $CI->typography->allow_js_event_handlers($allow_event_handlers);
+ $CI->typography->reduce_empty_lines($reduce_empty_lines);
+
return $CI->typography->convert($str);
}
}