Member Function Documentation
| static apply |
( |
|
$markup, |
|
|
|
$text, |
|
|
|
$trim |
|
) |
| |
|
static |
Apply markup rules and clean the text up.
- Parameters
-
| TextFormat | $markup | Markup rules applied on marked-up text. |
| string | $text | Marked-up text on which rules are applied. |
| boolean | $trim | Trim text before applying markup rules, if TRUE. |
- Returns
- string HTML code computed from marked-up text.
| static htmlReady |
( |
|
$text, |
|
|
|
$trim = true, |
|
|
|
$br = false, |
|
|
|
$double_encode = true |
|
) |
| |
|
static |
Convert special characters to HTML entities, and clean up.
- Parameters
-
| string | $text | This text's special chars will be converted. |
| boolean | $trim | Trim text before applying markup rules, if TRUE. |
| boolean | $br | Replace newlines by
, if TRUE. |
| boolean | $double_encode | Encode existing HTML entities, if TRUE. |
- Returns
- string The converted string.
Return True for HTML code and False for plain text.
A fairly simple heuristic is used: Every text that begins with '<' and ends with '>' is considered to be HTML code. Leading and trailing whitespace characters are ignored.
- Parameters
-
| string | $text | HTML code or plain text. |
- Returns
- boolean TRUE for HTML code, FALSE for plain text.
| static purify |
( |
|
$dirty_html | ) |
|
|
static |
Call HTMLPurifier to create safe HTML.
- Parameters
-
| string | $dirty_html | Unsafe or 'uncleaned' HTML code. |
- Returns
- string Clean and safe HTML code.
| static removeHTML |
( |
|
$html | ) |
|
|
static |
The documentation for this class was generated from the following file: