Class HTMLPurifier_Lexer_DirectLex

InheritanceHTMLPurifier_Lexer_DirectLex » HTMLPurifier_Lexer

Our in-house implementation of a parser.

A pure PHP parser, DirectLex has absolutely no dependencies, making it a reasonably good default for PHP4. Written with efficiency in mind, it can be four times faster than HTMLPurifier_Lexer_PEARSax3, although it pales in comparison to HTMLPurifier_Lexer_DOMLex.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$tracksLineNumbers HTMLPurifier_Lexer_DirectLex

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$_special_entity2str Most common entity to raw value conversion table for special entities. HTMLPurifier_Lexer
$_whitespace Whitespace characters for str(c)spn. HTMLPurifier_Lexer_DirectLex

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() HTMLPurifier_Lexer
create() Retrieves or sets the default Lexer as a Prototype Factory. HTMLPurifier_Lexer
extractBody() Takes a string of HTML (fragment or document) and returns the content HTMLPurifier_Lexer
normalize() Takes a piece of HTML and normalizes it by converting entities, fixing encoding, extracting bits, and other good stuff. HTMLPurifier_Lexer
parseAttributeString() Takes the inside of an HTML tag and makes an assoc array of attributes. HTMLPurifier_Lexer_DirectLex
parseData() Parses special entities into the proper characters. HTMLPurifier_Lexer
tokenizeHTML() HTMLPurifier_Lexer_DirectLex

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
CDATACallback() Callback function for escapeCDATA() that does the work. HTMLPurifier_Lexer
escapeCDATA() Translates CDATA sections into regular sections (through escaping). HTMLPurifier_Lexer
escapeCommentedCDATA() Special CDATA case that is especially convoluted for

Page generated on Mon, 05 Oct 2015 11:22:48 +0000

Powered by Yii Framework