PHP Class HTMLPurifier_PercentEncoder, yii

Mostra file Open project: yiisoft/yii Class Usage Examples

Protected Properties

Property Type Description
$preserve Reserved characters to preserve when using encode().

Public Methods

Method Description
__construct ( boolean $preserve = false ) String of characters that should be preserved while using encode().
encode ( string $string ) : string Our replacement for urlencode, it encodes all non-reserved characters, as well as any extra characters that were instructed to be preserved.
normalize ( string $string ) : string Fix up percent-encoding by decoding unreserved characters and normalizing.

Method Details

__construct() public method

String of characters that should be preserved while using encode().
public __construct ( boolean $preserve = false )
$preserve boolean

encode() public method

Our replacement for urlencode, it encodes all non-reserved characters, as well as any extra characters that were instructed to be preserved.
public encode ( string $string ) : string
$string string String to be encoded
return string Encoded string.

normalize() public method

Fix up percent-encoding by decoding unreserved characters and normalizing.
public normalize ( string $string ) : string
$string string String to normalize
return string

Property Details

$preserve protected_oe property

Reserved characters to preserve when using encode().
protected $preserve