\Horde_Text_Filter_Text2html

Turn text into HTML with varying levels of parsing. For no html whatsoever, use htmlspecialchars() instead.

Copyright 2002-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
preProcess()
getPatterns()
postProcess()
No public properties found
PASSTHRU
SYNTAX
MICRO
MICRO_LINKURL
NOHTML
NOHTML_NOBREAK
No protected methods found
$_params
N/A
No private methods found
No private properties found
N/A

Constants

PASSTHRU

PASSTHRU

SYNTAX

SYNTAX

MICRO

MICRO

MICRO_LINKURL

MICRO_LINKURL

NOHTML

NOHTML

NOHTML_NOBREAK

NOHTML_NOBREAK

Properties

$_params

$_params : array

Filter parameters.

Type

array

Methods

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

Parameters specific to this driver:

  • charset: (string) The charset to use for htmlspecialchars() calls.
  • class: (string) See Horde_Text_Filter_Linkurls::.
  • emails: (array) TODO
  • flowed: (string) For flowed text, the HTML blockquote tag to insert before each level.
  • linkurls: (array) TODO
  • parselevel: (integer) The parselevel of the output.
    • PASSTHRU: No action. Pass-through. Included for completeness.
    • SYNTAX: Allow full html, also do line-breaks, in-lining, syntax-parsing.
    • MICRO: Micro html (only line-breaks, in-line linking).
    • MICRO_LINKURL: Micro html (only line-breaks, in-line linking of URLS; no email addresses are linked).
    • NOHTML: No html (all stripped, only line-breaks).
    • NOHTML_NOBREAK: No html whatsoever, no line breaks added. Included for completeness.
  • space2html: (array) TODO

preProcess()

preProcess(mixed  $text) : string

Executes any code necessary before applying the filter patterns.

Parameters

mixed $text

The text before the filtering. Either a string or a Horde_Text_Flowed object (since 1.1.0).

Returns

string —

The modified text.

getPatterns()

getPatterns() : array

Returns a hash with replace patterns.

Returns

array —

Patterns hash.

postProcess()

postProcess(string  $text) : string

Executes any code necessaray after applying the filter patterns.

Parameters

string $text

The text after the filtering.

Returns

string —

The modified text.