MediaWiki  master
MediaWiki\Tidy\TidyDriverBase Class Reference

Base class for HTML cleanup utilities. More...

Inheritance diagram for MediaWiki\Tidy\TidyDriverBase:

Public Member Functions

 __construct ( $config)
 supportsValidate ()
 Return true if validate() can be used. More...
 tidy ( $text, ?callable $textProcessor=null)
 Clean up HTML. More...

Protected Attributes


Detailed Description

Base class for HTML cleanup utilities.

Definition at line 8 of file TidyDriverBase.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Tidy\TidyDriverBase::__construct (   $config)

Reimplemented in MediaWiki\Tidy\RemexDriver.

Definition at line 11 of file TidyDriverBase.php.

References MediaWiki\Tidy\TidyDriverBase\$config.

Member Function Documentation

◆ supportsValidate()

MediaWiki\Tidy\TidyDriverBase::supportsValidate ( )

Return true if validate() can be used.

since 1.36, always returns false

Definition at line 20 of file TidyDriverBase.php.

References wfDeprecated().

◆ tidy()

MediaWiki\Tidy\TidyDriverBase::tidy (   $text,
?callable  $textProcessor = null 

Clean up HTML.

string$textHTML document fragment to clean up
?callable$textProcessor A callback to run on the contents of text nodes (not elements or attribute values). This can be used to apply text modifications like french spacing or smart quotes, without affecting element or attribute markup.
string The corrected HTML output

Reimplemented in MediaWiki\Tidy\RemexDriver.

Member Data Documentation

◆ $config


The documentation for this class was generated from the following file: