PHP Class HTMLPurifier_Lexer, yii

Datei anzeigen Open project: yiisoft/yii Class Usage Examples

Public Properties

Property Type Description
$tracksLineNumbers If it does, set to true.

Protected Properties

Property Type Description
$_special_entity2str Most common entity to raw value conversion table for special entities.

Public Methods

Method Description
__construct ( ) -- CONVENIENCE MEMBERS ---------------------------------------------
create ( HTMLPurifier_Config $config ) : HTMLPurifier_Lexer Retrieves or sets the default Lexer as a Prototype Factory.
extractBody ( $html ) Takes a string of HTML (fragment or document) and returns the content
normalize ( string $html, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : string Takes a piece of HTML and normalizes it by converting entities, fixing encoding, extracting bits, and other good stuff.
parseData ( string $string ) : string Parses special entities into the proper characters.
tokenizeHTML ( $string, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : HTMLPurifier_Token[] Lexes an HTML string into tokens.

Protected Methods

Method Description
CDATACallback ( array $matches ) : string Callback function for escapeCDATA() that does the work.
escapeCDATA ( string $string ) : string Translates CDATA sections into regular sections (through escaping).
escapeCommentedCDATA ( string $string ) : string Special CDATA case that is especially convoluted for