Class HTMLPurifier_HTMLModule_Tidy

Description

Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.

  • todo: Figure out how to protect some of these methods/properties

Located in /lib/core/Parsers/htmlpurifier/HTMLPurifier.standalone.php (line 12389)

HTMLPurifier_HTMLModule
   |
   --HTMLPurifier_HTMLModule_Tidy
Direct descendents
Class Description
HTMLPurifier_HTMLModule_Tidy_Name Name is deprecated, but allowed in strict doctypes, so onl
HTMLPurifier_HTMLModule_Tidy_Proprietary Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
HTMLPurifier_HTMLModule_Tidy_XHTML Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
Variable Summary
Method Summary
Lookup getFixesForLevel ($level $level)
array(string getFixType ($name $name)
void makeFixes ()
void makeFixesForLevel ( $fixes)
void populate ($lookup $fixes)
void setup ( $config)
Variables
mixed $fixesForLevel = array(
'light' => array(),'medium'=>array(),'heavy'=>array())
(line 12407)

Lists of fixes used by getFixesForLevel(). Format is:

HTMLModule_Tidy->fixesForLevel[$level] = array('fix-1', 'fix-2');

  • access: public
mixed $levels = array(0 => 'none', 'light', 'medium', 'heavy') (line 12396)

List of supported levels. Index zero is a special case "no fixes" level.

  • access: public

Inherited Variables

Inherited from HTMLPurifier_HTMLModule

HTMLPurifier_HTMLModule::$attr_collections
HTMLPurifier_HTMLModule::$content_sets
HTMLPurifier_HTMLModule::$defines_child_def
HTMLPurifier_HTMLModule::$elements
HTMLPurifier_HTMLModule::$info
HTMLPurifier_HTMLModule::$info_attr_transform_post
HTMLPurifier_HTMLModule::$info_attr_transform_pre
HTMLPurifier_HTMLModule::$info_injector
HTMLPurifier_HTMLModule::$info_tag_transform
HTMLPurifier_HTMLModule::$name
HTMLPurifier_HTMLModule::$safe
Methods
getFixesForLevel (line 12454)

Retrieves all fixes per a level, returning fixes for that specific level as well as all levels below it.

  • return: up table of fixes
  • access: public
Lookup getFixesForLevel ($level $level)
  • $level $level: String level identifier, see $levels for valid values
getFixType (line 12553)

Parses a fix name and determines what kind of fix it is, as well

as other information defined by the fix

  • return: array $fix_parameters)
  • access: public
array(string getFixType ($name $name)
  • $name $name: String name of fix
makeFixes (line 12584)

Defines all fixes the module will perform in a compact associative array of fix name to fix implementation.

  • access: public
void makeFixes ()

Redefined in descendants as:
makeFixesForLevel (line 12484)

Dynamically populates the $fixesForLevel member variable using the fixes array. It may be custom overloaded, used in conjunction with $defaultLevel, or not used at all.

  • access: public
void makeFixesForLevel ( $fixes)
  • $fixes
populate (line 12501)

Populates the module with transforms and other special-case code

based on a list of fixes passed to it

  • access: public
void populate ($lookup $fixes)
  • $lookup $fixes: Lookup table of fixes to activate
setup (line 12419)

Lazy load constructs the module by determining the necessary fixes to create and then delegating to the populate() function.

  • todo: Wildcard matching and error reporting when an added or subtracted fix has no effect.
  • access: public
void setup ( $config)
  • $config

Redefinition of:
HTMLPurifier_HTMLModule::setup()
Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available.

Inherited Methods

Inherited From HTMLPurifier_HTMLModule

HTMLPurifier_HTMLModule::addBlankElement()
HTMLPurifier_HTMLModule::addElement()
HTMLPurifier_HTMLModule::addElementToContentSet()
HTMLPurifier_HTMLModule::getChildDef()
HTMLPurifier_HTMLModule::makeLookup()
HTMLPurifier_HTMLModule::mergeInAttrIncludes()
HTMLPurifier_HTMLModule::parseContents()
HTMLPurifier_HTMLModule::setup()

Documentation generated on Sun, 06 Mar 2011 00:24:08 -0500 by phpDocumentor 1.4.3