\HTMLPurifier_PercentEncoder

Class that handles operations involving percent-encoding in URIs.

Summary

Methods
Properties
Constants
__construct()
encode()
normalize()
No public properties found
No constants found
No protected methods found
$preserve
N/A
No private methods found
No private properties found
N/A

Properties

$preserve

$preserve

Reserved characters to preserve when using encode().

Methods

__construct()

__construct(bool  $preserve = false) : mixed

String of characters that should be preserved while using encode().

Parameters

bool $preserve

Returns

mixed —

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.

Parameters

string $string

String to be encoded

Returns

string —

Encoded string.

normalize()

normalize(string  $string) : string

Fix up percent-encoding by decoding unreserved characters and normalizing.

Parameters

string $string

String to normalize

Returns

string —