MediaWiki REL1_30
|
Class to interact with HTML tidy. More...
Static Public Member Functions | |
static | checkErrors ( $text, &$errorStr=null) |
Check HTML for errors, used if $wgValidateAllHtml = true. | |
static | destroySingleton () |
Destroy the current singleton instance. | |
static | factory (array $config) |
Create a new Tidy driver object from configuration. | |
static | isEnabled () |
static | setInstance ( $instance) |
Set the driver to be used. | |
static | singleton () |
static | tidy ( $text) |
Interface with html tidy. | |
Static Private Attributes | |
static | $instance |
Class to interact with HTML tidy.
Either the external tidy program or the in-process tidy extension will be used depending on availability. Override the default $wgTidyInternal setting to disable the internal if it's not working.
Definition at line 33 of file MWTidy.php.
|
static |
Check HTML for errors, used if $wgValidateAllHtml = true.
string | $text | |
string | &$errorStr | Return the error string |
MWException |
Definition at line 63 of file MWTidy.php.
References singleton().
Referenced by MediaWikiTestCase\assertValidHtmlDocument(), and wfHtmlValidationHandler().
|
static |
Destroy the current singleton instance.
Definition at line 163 of file MWTidy.php.
Referenced by ParserTestRunner\perTestSetup(), TextContentTest\setUp(), TextContentTest\tearDown(), and SanitizerTest\tearDown().
|
static |
Create a new Tidy driver object from configuration.
array | $config |
MWException |
Definition at line 124 of file MWTidy.php.
References $instance.
Referenced by BenchmarkTidy\execute(), ParserTestRunner\perTestSetup(), and singleton().
|
static |
Definition at line 79 of file MWTidy.php.
References singleton().
Referenced by MediaWikiTestCase\assertValidHtmlDocument(), Parser\internalParseHalfParsed(), Sanitizer\removeHTMLtags(), and TidyTest\setUp().
|
static |
Set the driver to be used.
This is for testing.
MediaWiki\\Tidy\\TidyDriverBase | false | null | $instance |
Definition at line 156 of file MWTidy.php.
References $instance.
Referenced by ParserTestRunner\perTestSetup(), SanitizerTest\testRemoveHTMLtags(), and SanitizerTest\testRemovehtmltagsOnHtml5Tags().
|
static |
Definition at line 86 of file MWTidy.php.
References $instance, $wgDebugTidy, $wgTidyBin, $wgTidyConf, $wgTidyConfig, $wgTidyInternal, $wgTidyOpts, $wgUseTidy, factory(), and wfIsHHVM().
Referenced by checkErrors(), BenchmarkTidy\execute(), isEnabled(), and tidy().
|
static |
Interface with html tidy.
If tidy isn't able to correct the markup, the original will be returned in all its glory with a warning comment appended.
string | $text | HTML input fragment. This should not contain a <body> or <html> tag. |
MWException |
Definition at line 46 of file MWTidy.php.
References singleton().
Referenced by SpecialExpandTemplates\execute(), Parser\internalParseHalfParsed(), and TidyTest\testTidyWrapping().
|
staticprivate |
Definition at line 34 of file MWTidy.php.
Referenced by factory(), setInstance(), and singleton().