Class HTMLPurifier_PercentEncoder
Inheritance | HTMLPurifier_PercentEncoder |
---|
Class that handles operations involving percent-encoding in URIs.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$preserve | Reserved characters to preserve when using encode(). | HTMLPurifier_PercentEncoder |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | String of characters that should be preserved while using encode(). | HTMLPurifier_PercentEncoder |
encode() | Our replacement for urlencode, it encodes all non-reserved characters, as well as any extra characters that were instructed to be preserved. | HTMLPurifier_PercentEncoder |
normalize() | Fix up percent-encoding by decoding unreserved characters and normalizing. | HTMLPurifier_PercentEncoder |
Property Details
Method Details
String of characters that should be preserved while using encode().
public void __construct ( $preserve = false ) | ||
$preserve | bool |
Our replacement for urlencode, it encodes all non-reserved characters, as well as any extra characters that were instructed to be preserved.
public string encode ( $string ) | ||
$string | string | String to be encoded |
return | string | Encoded string. |
---|
Fix up percent-encoding by decoding unreserved characters and normalizing.
public string normalize ( $string ) | ||
$string | string | String to normalize |