Public Member Functions | |
auto_typography ($str, $reduce_linebreaks=FALSE) | |
format_characters ($str) | |
_format_newlines ($str) | |
_protect_characters ($match) | |
nl2br_except_pre ($str) | |
_format_newlines | ( | $str) |
Format Newlines
Converts newline characters into either
tags or
public
string |
_protect_characters | ( | $match) |
Protect Characters
Protects special characters from being formatted later We don't want quotes converted within tags so we'll temporarily convert them to {} and {} and we don't want double dashes converted to emdash entities, so they are marked with {} likewise double spaces are converted to {} to prevent entity conversion
public
array |
auto_typography | ( | $str, | |
$reduce_linebreaks = FALSE |
|||
) |
Auto Typography
This function converts text, making it typographically correct:
public
string | |
bool | whether to reduce more then two consecutive newlines to two |
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 |
nl2br_except_pre | ( | $str) |
Convert newlines to HTML line breaks except within PRE tags
public
string |