Class HTMLPurifier_EntityParser

Description

Handles referencing and derefencing character entities

Handles referencing and derefencing character entities

Located in /library/HTMLPurifier/EntityParser.php (line 10)


	
			
Variable Summary
Method Summary
Replacement nonSpecialEntityCallback ($matches $matches)
Replacement specialEntityCallback ($matches $matches)
Parsed substituteNonSpecialEntities ($string $string)
Parsed substituteSpecialEntities ($string $string)
Variables
mixed $_entity_lookup (line 16)

Reference to entity lookup table.

Reference to entity lookup table.

  • access: protected
mixed $_special_dec2str = array(
34 => '"',
38 => '&',
39 => "'",
60 => '<',
62 => '>'
)
(line 29)

Decimal to parsed string conversion table for special entities.

Decimal to parsed string conversion table for special entities.

  • access: protected
mixed $_special_ent2dec = array(
'quot' => 34,
'amp' => 38,
'lt' => 60,
'gt' => 62
)
(line 41)

Stripped entity names to decimal conversion table for special entities.

Stripped entity names to decimal conversion table for special entities.

  • access: protected
mixed $_substituteEntitiesRegex =
'/&(?:[#]x([a-fA-F0-9]+)|[#]0*(\d+)|([A-Za-z_:][A-Za-z0-9.\-_:]*));?/'
(line 21)

Callback regex string for parsing entities.

Callback regex string for parsing entities.

  • access: protected
Methods
nonSpecialEntityCallback (line 75)

Callback function for substituteNonSpecialEntities() that does the work.

Callback function for substituteNonSpecialEntities() that does the work.

  • return: string.
  • access: protected
Replacement nonSpecialEntityCallback ($matches $matches)
  • $matches $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).
specialEntityCallback (line 126)

Callback function for substituteSpecialEntities() that does the work.

Callback function for substituteSpecialEntities() that does the work. This callback has same syntax as nonSpecialEntityCallback().

  • return: string.
  • access: protected
Replacement specialEntityCallback ($matches $matches)
  • $matches $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).
substituteNonSpecialEntities (line 57)

Substitutes non-special entities with their parsed equivalents. running this whenever you have parsed character is t3h 5uck, we run it before everything else.

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.

  • return: string.
  • access: public
Parsed substituteNonSpecialEntities ($string $string)
  • $string $string: String to have non-special entities parsed.
substituteSpecialEntities (line 109)

Substitutes only special entities with their parsed equivalents.

Substitutes only special entities with their parsed equivalents.

  • return: string.
  • access: public
Parsed substituteSpecialEntities ($string $string)
  • $string $string: String to have non-special entities parsed.

Documentation generated on Thu, 19 Jun 2008 18:49:09 -0400 by phpDocumentor 1.4.2