Public Member Functions | |
CI_Typography () | |
auto_typography ($str, $reduce_linebreaks=FALSE) | |
format_characters ($str) | |
_format_newlines ($str) | |
nl2br_except_pre ($str) | |
Public Attributes | |
$block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul' | |
$skip_elements = 'p|pre|ol|ul|dl|object|table' | |
$inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var' | |
$inner_block_required = array('blockquote') | |
$last_block_element = '' | |
$protect_braced_quotes = FALSE |
CI_Typography::_format_newlines | ( | $ | str | ) |
Format Newlines
Converts newline characters into either
tags or
public
string |
CI_Typography::auto_typography | ( | $ | str, | |
$ | reduce_linebreaks = FALSE | |||
) |
Auto Typography
This function converts text, making it typographically correct:
Converts two spaces into entities
public
string | ||
bool | whether to reduce more then two consecutive newlines to two |
CI_Typography::CI_Typography | ( | ) |
Nothing to do here...
CI_Typography::format_characters | ( | $ | str | ) |
Format Characters
This function mainly converts double and single quotes to curly entities, but it also converts em-dashes, double spaces, and ampersands
public
string |
CI_Typography::nl2br_except_pre | ( | $ | str | ) |
Convert newlines to HTML line breaks except within PRE tags
public
string |
CI_Typography::$block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul' |
CI_Typography::$inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var' |
CI_Typography::$inner_block_required = array('blockquote') |
CI_Typography::$last_block_element = '' |
CI_Typography::$protect_braced_quotes = FALSE |
CI_Typography::$skip_elements = 'p|pre|ol|ul|dl|object|table' |