ILIAS
Release_5_0_x_branch Revision 61816
|
Handles referencing and derefencing character entities. More...
Public Member Functions | |
substituteNonSpecialEntities ($string) | |
Substitutes non-special entities with their parsed equivalents. | |
substituteSpecialEntities ($string) | |
Substitutes only special entities with their parsed equivalents. |
Protected Member Functions | |
nonSpecialEntityCallback ($matches) | |
Callback function for substituteNonSpecialEntities() that does the work. | |
specialEntityCallback ($matches) | |
Callback function for substituteSpecialEntities() that does the work. |
Protected Attributes | |
$_entity_lookup | |
Reference to entity lookup table. | |
$_substituteEntitiesRegex | |
Callback regex string for parsing entities. | |
$_special_dec2str | |
Decimal to parsed string conversion table for special entities. | |
$_special_ent2dec | |
Stripped entity names to decimal conversion table for special entities. |
Handles referencing and derefencing character entities.
Definition at line 10 of file EntityParser.php.
|
protected |
Callback function for substituteNonSpecialEntities() that does the work.
array | $matches | PCRE matches array, with 0 the entire match, and either index 1, 2 or 3 set with a hex value, dec value, or string (respectively). |
Definition at line 79 of file EntityParser.php.
References HTMLPurifier_EntityLookup\instance(), and HTMLPurifier_Encoder\unichr().
|
protected |
Callback function for substituteSpecialEntities() that does the work.
This callback has same syntax as nonSpecialEntityCallback().
array | $matches | PCRE-style matches array, with 0 the entire match, and either index 1, 2 or 3 set with a hex value, dec value, or string (respectively). |
Definition at line 135 of file EntityParser.php.
HTMLPurifier_EntityParser::substituteNonSpecialEntities | ( | $string | ) |
Substitutes non-special entities with their parsed equivalents.
Since running this whenever you have parsed character is t3h 5uck, we run it before everything else.
string | $string | String to have non-special entities parsed. |
Definition at line 60 of file EntityParser.php.
HTMLPurifier_EntityParser::substituteSpecialEntities | ( | $string | ) |
Substitutes only special entities with their parsed equivalents.
We try to avoid calling this function because otherwise, it would have to be called a lot (for every parsed section).
string | $string | String to have non-special entities parsed. |
Definition at line 116 of file EntityParser.php.
|
protected |
Reference to entity lookup table.
Definition at line 17 of file EntityParser.php.
|
protected |
Decimal to parsed string conversion table for special entities.
array
Definition at line 31 of file EntityParser.php.
|
protected |
Stripped entity names to decimal conversion table for special entities.
array
Definition at line 44 of file EntityParser.php.
|
protected |
Callback regex string for parsing entities.
string
Definition at line 23 of file EntityParser.php.