\HTMLPurifier_HTMLModule_Tidy_XHTML
Synopsis
class HTMLPurifier_HTMLModule_Tidy_XHTML
extends HTMLPurifier_HTMLModule_Tidy
{
- // members
- public string $name = 'Tidy_XHTML';
- public string $defaultLevel = 'medium';
- // Inherited members from HTMLPurifier_HTMLModule_Tidy
- public array $levels;
- public $defaultLevel;
- public array $fixesForLevel;
- // Inherited members from HTMLPurifier_HTMLModule
- public $name;
- public array $elements;
- public array $info;
- public array $content_sets;
- public array $attr_collections;
- public array $info_tag_transform;
- public array $info_attr_transform_pre;
- public array $info_attr_transform_post;
- public array $info_injector;
- public boolean $defines_child_def;
- public boolean $safe;
- // methods
- public void makeFixes()
- // Inherited methods from HTMLPurifier_HTMLModule_Tidy
- public void setup()
- public Lookup getFixesForLevel()
- public void makeFixesForLevel()
- public void populate()
- public array(string getFixType()
- public void makeFixes()
- // Inherited methods from HTMLPurifier_HTMLModule
- public HTMLPurifier_ChildDef getChildDef()
- public Created addElement()
- public Created addBlankElement()
- public void addElementToContentSet()
- public void parseContents()
- public void mergeInAttrIncludes()
- public Lookup makeLookup()
- public void setup()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
38+ | Wildcard matching and error reporting when an added or subtracted fix has no effect. |
Members
public
-
$attr_collections
Associative array of attribute collection names to attribute collection additions. More rarely used for adding attributes to the global collections. Example is the StyleAttribute module adding the style attribute to the Core. Corresponds to HTMLDefinition's attr_collections->info, since the object's data is only info, with extra behavior associated with it. -
$content_sets
Associative array of content set names to content set additions. - $defaultLevel
-
$defaultLevel
Default level to place all fixes in. Disabled by default -
$defines_child_def
Boolean flag that indicates whether or not getChildDef is implemented. -
$elements
Informally, a list of elements this module changes. Not used in any significant way. -
$fixesForLevel
Lists of fixes used by getFixesForLevel(). Format is: HTMLModule_Tidy->fixesForLevel[$level] = array('fix-1', 'fix-2'); -
$info
Associative array of element names to element definitions. -
$info_attr_transform_post
List of HTMLPurifier_AttrTransform to be performed after validation. -
$info_attr_transform_pre
List of HTMLPurifier_AttrTransform to be performed before validation. -
$info_injector
List of HTMLPurifier_Injector to be performed during well-formedness fixing. -
$info_tag_transform
Associative array of deprecated tag name to HTMLPurifier_TagTransform -
$levels
List of supported levels. Index zero is a special case "no fixes" level. - $name
-
$name
Short unique string identifier of the module -
$safe
Boolean flag whether or not this module is safe. If it is not safe, all of its members are unsafe. Modules are safe by default (this might be slightly dangerous, but it doesn't make much sense to force HTML Purifier, which is based off of safe HTML, to explicitly say, "This is safe," even though there are modules which are "unsafe")
Methods
public
Inherited from HTMLPurifier_HTMLModule_Tidy
public
- getFixType() — Parses a fix name and determines what kind of fix it is, as well as other information defined by the fix
- getFixesForLevel() — Retrieves all fixes per a level, returning fixes for that specific level as well as all levels below it.
- makeFixes() — Defines all fixes the module will perform in a compact associative array of fix name to fix implementation.
- makeFixesForLevel() — 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.
- populate() — Populates the module with transforms and other special-case code based on a list of fixes passed to it
- setup() — Lazy load constructs the module by determining the necessary fixes to create and then delegating to the populate() function.
Inherited from HTMLPurifier_HTMLModule
public
- addBlankElement() — Convenience function that creates a totally blank, non-standalone element.
- addElement() — Convenience function that sets up a new element
- addElementToContentSet() — Convenience function that registers an element to a content set
- getChildDef() — Retrieves a proper HTMLPurifier_ChildDef subclass based on content_model and content_model_type member variables of the HTMLPurifier_ElementDef class. There is a similar function in HTMLPurifier_HTMLDefinition.
- makeLookup() — Convenience function that generates a lookup table with boolean true as value.
- mergeInAttrIncludes() — Convenience function that merges a list of attribute includes into an attribute array.
- parseContents() — Convenience function that transforms single-string contents into separate content model and content model type
- setup() — Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available.