◆ entityCallback()
HTMLPurifier_EntityParser::entityCallback |
( |
| $matches | ) |
|
|
protected |
Callback function for substituteNonSpecialEntities() that does the work.
- Parameters
-
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). |
- Return values
-
string | Replacement string. |
◆ nonSpecialEntityCallback()
HTMLPurifier_EntityParser::nonSpecialEntityCallback |
( |
| $matches | ) |
|
|
protected |
Callback function for substituteNonSpecialEntities() that does the work.
- Parameters
-
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). |
- Return values
-
string | Replacement string. |
◆ specialEntityCallback()
HTMLPurifier_EntityParser::specialEntityCallback |
( |
| $matches | ) |
|
|
protected |
Callback function for substituteSpecialEntities() that does the work.
This callback has same syntax as nonSpecialEntityCallback().
- Parameters
-
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). |
- Return values
-
string | Replacement string. |
◆ substituteAttrEntities()
HTMLPurifier_EntityParser::substituteAttrEntities |
( |
| $string | ) |
|
Substitute entities with the parsed equivalents.
Use this on attribute contents in documents.
- Parameters
-
string | $string | String to have entities parsed. |
- Return values
-
◆ substituteNonSpecialEntities()
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.
- Parameters
-
string | $string | String to have non-special entities parsed. |
- Return values
-
◆ substituteSpecialEntities()
HTMLPurifier_EntityParser::substituteSpecialEntities |
( |
| $string | ) |
|
Substitutes only special entities with their parsed equivalents.
@notice We try to avoid calling this function because otherwise, it would have to be called a lot (for every parsed section).
- Parameters
-
string | $string | String to have non-special entities parsed. |
- Return values
-
◆ substituteTextEntities()
HTMLPurifier_EntityParser::substituteTextEntities |
( |
| $string | ) |
|
Substitute entities with the parsed equivalents.
Use this on textual data in an HTML document (as opposed to attributes.)
- Parameters
-
string | $string | String to have entities parsed. |
- Return values
-
◆ $_attrEntitiesRegex
HTMLPurifier_EntityParser::$_attrEntitiesRegex |
|
protected |
Callback regex string for entities in attributes.
@type string
◆ $_entity_lookup
HTMLPurifier_EntityParser::$_entity_lookup |
|
protected |
◆ $_special_dec2str
HTMLPurifier_EntityParser::$_special_dec2str |
|
protected |
Initial value:=
array(
34 => '"',
38 => '&',
39 => "'",
60 => '<',
62 => '>'
)
Decimal to parsed string conversion table for special entities.
@type array
◆ $_special_ent2dec
HTMLPurifier_EntityParser::$_special_ent2dec |
|
protected |
Initial value:=
array(
'quot' => 34,
'amp' => 38,
'lt' => 60,
'gt' => 62
)
Stripped entity names to decimal conversion table for special entities.
@type array
◆ $_substituteEntitiesRegex
HTMLPurifier_EntityParser::$_substituteEntitiesRegex |
|
protected |
Initial value:=
'/&(?:[#]x([a-fA-F0-9]+)|[#]0*(::d+)|([A-Za-z_:][A-Za-z0-9.::-_:]*));?/'
Callback regex string for parsing entities.
@type string
◆ $_textEntitiesRegex
HTMLPurifier_EntityParser::$_textEntitiesRegex |
|
protected |
Callback regex string for entities in text.
@type string
The documentation for this class was generated from the following file:
- lib/htmlpurifier/HTMLPurifier/EntityParser.php