\HTMLPurifier_EntityParser
Handles referencing and derefencing character entities
Synopsis
class HTMLPurifier_EntityParser
{
- // members
- protected $_entity_lookup;
- protected string $_substituteEntitiesRegex = '/&(?:[#]x([a-fA-F0-9]+)|[#]0*(\d+)|([A-Za-z_:][A-Za-z0-9.\-_:]*));?/';
- protected array $_special_dec2str = ;
- protected array $_special_ent2dec = ;
- // methods
- public void substituteNonSpecialEntities()
- protected void nonSpecialEntityCallback()
- public void substituteSpecialEntities()
- protected void specialEntityCallback()
Members
protected
-
$_entity_lookup
Reference to entity lookup table. -
$_special_dec2str
Decimal to parsed string conversion table for special entities. -
$_special_ent2dec
Stripped entity names to decimal conversion table for special entities. -
$_substituteEntitiesRegex
Callback regex string for parsing entities.
Methods
protected
- nonSpecialEntityCallback() — Callback function for substituteNonSpecialEntities() that does the work.
- specialEntityCallback() — Callback function for substituteSpecialEntities() that does the work.
public
- substituteNonSpecialEntities() — 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.
- substituteSpecialEntities() — Substitutes only special entities with their parsed equivalents.