Class HTMLPurifier_EntityParser
Handles referencing and derefencing character entities
public
string
|
#
substituteNonSpecialEntities( string $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. |
protected
string
|
#
nonSpecialEntityCallback( array $matches )
Callback function for substituteNonSpecialEntities() that does the work. |
public
string
|
#
substituteSpecialEntities( string $string )
Substitutes only special entities with their parsed equivalents. |
protected
string
|
#
specialEntityCallback( array $matches )
Callback function for substituteSpecialEntities() that does the work. |
protected
mixed
|
$_entity_lookup |
|
#
Reference to entity lookup table. |
protected
string
|
$_substituteEntitiesRegex | '/&(?:[#]x([a-fA-F0-9]+)|[#]0*(\d+)|([A-Za-z_:][A-Za-z0-9.\-_:]*));?/' |
#
Callback regex string for parsing entities. |
protected
array
|
$_special_dec2str | array(
34 => '"',
38 => '&',
39 => "'",
60 => '<',
62 => '>'
) |
#
Decimal to parsed string conversion table for special entities. |
protected
array
|
$_special_ent2dec | array(
'quot' => 34,
'amp' => 38,
'lt' => 60,
'gt' => 62
) |
#
Stripped entity names to decimal conversion table for special entities. |