\Horde_Text_Filter_Cleanascii

Removes some common entities and high-ascii or otherwise nonstandard characters common in text pasted from Microsoft Word into a browser.

This function should NOT be used on non-ASCII text; it may and probably will butcher other character sets indescriminately. Use it only to clean US-ASCII (7-bit) text which you suspect (or know) may have invalid or non-printing characters in it.

Copyright 2004-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
No constants found
No protected methods found
$_params
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Filter parameters.

Type

array

Methods

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

Any parameters that the filter instance needs.

preProcess()

preProcess(string  $text) : string

Executes any code necessary before applying the filter patterns.

Parameters

string $text

The text before the filtering.

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.