Horde_Text_Filter_Cleanhtml
extends Horde_Text_Filter_Base
in package
This filter attempts to sanitize HTML by cleaning up malformed HTML tags.
Parameters:
- body_only: (boolean) Only return the body data? DEFAULT: Return the whole HTML document
- charset: (string) Charset of the data. DEFAULT: UTF-8
- size: (integer) Only filter if data is below this size. DEFAULT: No default
Tags
Table of Contents
- $_params : array<string|int, mixed>
- Filter parameters.
- __construct() : mixed
- Constructor.
- getPatterns() : array<string|int, mixed>
- Returns a hash with replace patterns.
- postProcess() : string
- Executes any code necessary after applying the filter patterns.
- preProcess() : string
- Executes any code necessaray before applying the filter patterns.
Properties
$_params
Filter parameters.
protected
array<string|int, mixed>
$_params
= array('body_only' => \false, 'charset' => 'UTF-8', 'size' => \false)
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Any parameters that the filter instance needs.
Return values
mixed —getPatterns()
Returns a hash with replace patterns.
public
getPatterns() : array<string|int, mixed>
Return values
array<string|int, mixed> —Patterns hash.
postProcess()
Executes any code necessary after applying the filter patterns.
public
postProcess(string $text) : string
Parameters
- $text : string
-
The text after the filtering.
Return values
string —The modified text.
preProcess()
Executes any code necessaray before applying the filter patterns.
public
preProcess(string $text) : string
Parameters
- $text : string
-
The text before the filtering.
Return values
string —The modified text.