summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/typography_helper.rst
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/helpers/typography_helper.rst')
-rw-r--r--user_guide_src/source/helpers/typography_helper.rst45
1 files changed, 34 insertions, 11 deletions
diff --git a/user_guide_src/source/helpers/typography_helper.rst b/user_guide_src/source/helpers/typography_helper.rst
index f3202603a..3c81687ac 100644
--- a/user_guide_src/source/helpers/typography_helper.rst
+++ b/user_guide_src/source/helpers/typography_helper.rst
@@ -10,9 +10,7 @@ in semantically relevant ways.
Loading this Helper
===================
-This helper is loaded using the following code
-
-::
+This helper is loaded using the following code::
$this->load->helper('typography');
@@ -21,9 +19,18 @@ The following functions are available:
auto_typography()
=================
+.. php:function:: auto_typography($str, $reduce_linebreaks = FALSE)
+
+ :param string $str: Input string
+ :param bool $reduce_linebreaks: Whether to reduce multiple instances of double newlines to two
+ :returns: string
+
Formats text so that it is semantically and typographically correct
-HTML. Please see the :doc:`Typography Class <../libraries/typography>`
-for more info.
+HTML.
+
+This function is an alias for ``CI_Typography::auto_typography``.
+For more info, please see the :doc:`Typography Library
+<../libraries/typography>` documentation.
Usage example::
@@ -31,18 +38,34 @@ Usage example::
.. note:: Typographic formatting can be processor intensive, particularly if
you have a lot of content being formatted. If you choose to use this
- function you may want to consider `caching </general/caching>` your pages.
+ function you may want to consider `caching <../general/caching>` your
+ pages.
nl2br_except_pre()
==================
-Converts newlines to <br /> tags unless they appear within <pre> tags.
-This function is identical to the native PHP nl2br() function, except
-that it ignores <pre> tags.
+.. php:function:: nl2br_except_pre($str)
-Usage example
+ :param string $str: Input string
+ :returns: string
-::
+Converts newlines to <br /> tags unless they appear within <pre> tags.
+This function is identical to the native PHP ``nl2br()`` function,
+except that it ignores <pre> tags.
+
+Usage example::
$string = nl2br_except_pre($string);
+entity_decode()
+===============
+
+.. php:function:: entity_decode($str, $charset = NULL)
+
+ :param string $str: Input string
+ :param string $charset: Character set
+ :returns: string
+
+This function is an alias for ``CI_Security::entity_decode()``.
+Fore more info, please see the :doc:`Security Library
+<../libraries/security>` documentation. \ No newline at end of file