summaryrefslogtreecommitdiffstats
path: root/system/helpers/typography_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-07 21:25:16 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-07 21:25:16 +0200
commit27af930d4ed1daf9f2710b005d103c7f1c7d919d (patch)
treeffe257a549ae70749dcf4646695a0d73535e237e /system/helpers/typography_helper.php
parent87ac4260063e3a62805cc8f6f73cd2eb18da663a (diff)
parent928b9aa6340654b1dbb69af44c41468456f0b7b6 (diff)
Merge upstream branch
Diffstat (limited to 'system/helpers/typography_helper.php')
-rw-r--r--system/helpers/typography_helper.php47
1 files changed, 23 insertions, 24 deletions
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index 7a3db5d6b..af9d16a89 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -37,14 +37,14 @@
// ------------------------------------------------------------------------
-/**
- * Convert newlines to HTML line breaks except within PRE tags
- *
- * @param string
- * @return string
- */
if ( ! function_exists('nl2br_except_pre'))
{
+ /**
+ * Convert newlines to HTML line breaks except within PRE tags
+ *
+ * @param string
+ * @return string
+ */
function nl2br_except_pre($str)
{
$CI =& get_instance();
@@ -55,16 +55,16 @@ if ( ! function_exists('nl2br_except_pre'))
// ------------------------------------------------------------------------
-/**
- * Auto Typography Wrapper Function
- *
- * @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'))
{
+ /**
+ * Auto Typography Wrapper Function
+ *
+ * @param string
+ * @param bool whether to allow javascript event handlers
+ * @param bool whether to reduce multiple instances of double newlines to two
+ * @return string
+ */
function auto_typography($str, $strip_js_event_handlers = TRUE, $reduce_linebreaks = FALSE)
{
$CI =& get_instance();
@@ -73,20 +73,19 @@ if ( ! function_exists('auto_typography'))
}
}
-
// --------------------------------------------------------------------
-/**
- * HTML Entities Decode
- *
- * This function is a replacement for html_entity_decode()
- *
- * @param string
- * @param string
- * @return string
- */
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)
{
global $SEC;