<exclude-pattern>includes/export/DumpPipeOutput\.php</exclude-pattern>
<exclude-pattern>includes/resourceloader/ResourceLoaderImage\.php</exclude-pattern>
<exclude-pattern>includes/shell/Command\.php</exclude-pattern>
- <exclude-pattern>includes/tidy/RaggettExternal\.php</exclude-pattern>
<exclude-pattern>maintenance/dumpTextPass\.php</exclude-pattern>
<exclude-pattern>maintenance/mysql\.php</exclude-pattern>
<exclude-pattern>maintenance/storage/recompressTracked\.php</exclude-pattern>
* (T199334) $wgTagStatisticsNewTable — This temporary setting, added in
MediaWiki 1.32, has now been removed. When loading Special:Tags, MediaWiki
will now always use the `change_tag_def` instead of the `change_tag` table.
+* MediaWiki now always tidies user output, and most related
+ configuration has been removed. Thus $wgUseTidy, $wgTidyBin,
+ $wgTidyConf, $wgTidyOpts, $wgTidyInternal, and $wgDebugTidy, all
+ deprecated since 1.26, have now all been removed. The $wgTidyConfig
+ setting remains only for Remex experimental features or debugging.
* …
=== New features in 1.33 ===
* ParserOptions defaults 'tidy' to true now, since the untidy modes of the
parser are being deprecated and ParserOptions::getCanonicalOverrides()
has always been true at any rate.
+* Support for disabling tidy and external tidy implementations has been removed.
+ This was deprecated in 1.32. The pure PHP Remex tidy implementation is now
+ used and no configuration is necessary.
* A number of deprecated methods for API documentation, intended for overriding
by extensions, are no longer called by MediaWiki, and will emit deprecation
notices if your extension attempts to use them:
/**
* Configuration for HTML postprocessing tool. Set this to a configuration
* array to enable an external tool. By default, we now use the RemexHtml
- * library; historically, Dave Raggett's "HTML Tidy" was typically used.
- * See https://www.w3.org/People/Raggett/tidy/
- *
- * Setting this to null is deprecated.
- *
- * If this is null and $wgUseTidy is true, the deprecated configuration
- * parameters will be used instead.
- *
- * If this is null and $wgUseTidy is false, a pure PHP fallback will be used.
- * (Equivalent to setting `$wgTidyConfig['driver'] = 'disabled'`.)
- *
- * Keys are:
- * - driver: May be:
- * - RemexHtml: Use the RemexHtml library in PHP
- * - RaggettInternalHHVM: Use the limited-functionality HHVM extension
- * Deprecated since 1.32.
- * - RaggettInternalPHP: Use the PECL extension
- * Deprecated since 1.32.
- * - RaggettExternal: Shell out to an external binary (tidyBin)
- * Deprecated since 1.32.
- * - disabled: Disable tidy pass and use a hacky pure PHP workaround
- * (this is what setting $wgUseTidy to false used to do)
- * Deprecated since 1.32.
- *
- * - tidyConfigFile: Path to configuration file for any of the Raggett drivers
- * - debugComment: True to add a comment to the output with warning messages
- * - tidyBin: For RaggettExternal, the path to the tidy binary.
- * - tidyCommandLine: For RaggettExternal, additional command line options.
+ * library; historically, other postprocessors were used.
+ *
+ * Setting this to null will use default settings.
+ *
+ * Keys include:
+ * - driver: formerly used to select a postprocessor; now ignored.
+ * - treeMutationTrace: a boolean to turn on Remex tracing
+ * - serializerTrace: a boolean to turn on Remex tracing
+ * - mungerTrace: a boolean to turn on Remex tracing
+ * - pwrap: whether <p> wrapping should be done (default true)
+ *
+ * See includes/tidy/RemexDriver.php for detail on configuration.
+ *
+ * Overriding the default configuration is strongly discouraged in
+ * production.
*/
$wgTidyConfig = [ 'driver' => 'RemexHtml' ];
-/**
- * Set this to true to use the deprecated tidy configuration parameters.
- * @deprecated since 1.26, use $wgTidyConfig['driver'] = 'disabled'
- */
-$wgUseTidy = false;
-
-/**
- * The path to the tidy binary.
- * @deprecated since 1.26, use $wgTidyConfig['tidyBin']
- */
-$wgTidyBin = 'tidy';
-
-/**
- * The path to the tidy config file
- * @deprecated since 1.26, use $wgTidyConfig['tidyConfigFile']
- */
-$wgTidyConf = $IP . '/includes/tidy/tidy.conf';
-
-/**
- * The command line options to the tidy binary
- * @deprecated since 1.26, use $wgTidyConfig['tidyCommandLine']
- */
-$wgTidyOpts = '';
-
-/**
- * Set this to true to use the tidy extension
- * @deprecated since 1.26, use $wgTidyConfig['driver']
- */
-$wgTidyInternal = extension_loaded( 'tidy' );
-
-/**
- * Put tidy warnings in HTML comments
- * Only works for internal tidy.
- * @deprecated since 1.26, use $wgTidyConfig['debugComment']
- */
-$wgDebugTidy = false;
-
/**
* Allow raw, unchecked HTML in "<html>...</html>" sections.
* THIS IS VERY DANGEROUS on a publicly editable site, so USE wgGroupPermissions
*/
/**
- * 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.
+ * Class to interact with and configure Remex tidy
*
* @ingroup Parser
*/
private static $instance;
/**
- * Interface with html tidy.
+ * Interface with Remex tidy.
* If tidy isn't able to correct the markup, the original will be
* returned in all its glory with a warning comment appended.
*
* @return bool|\MediaWiki\Tidy\TidyDriverBase
*/
public static function singleton() {
- global $wgUseTidy, $wgTidyInternal, $wgTidyConf, $wgDebugTidy, $wgTidyConfig,
- $wgTidyBin, $wgTidyOpts;
-
+ global $wgTidyConfig;
if ( self::$instance === null ) {
- if ( $wgTidyConfig !== null ) {
- $config = $wgTidyConfig;
- } elseif ( $wgUseTidy ) {
- // b/c configuration
- wfDeprecated( '$wgUseTidy', '1.26' );
- $config = [
- 'tidyConfigFile' => $wgTidyConf,
- 'debugComment' => $wgDebugTidy,
- 'tidyBin' => $wgTidyBin,
- 'tidyCommandLine' => $wgTidyOpts ];
- if ( $wgTidyInternal ) {
- if ( wfIsHHVM() ) {
- $config['driver'] = 'RaggettInternalHHVM';
- } else {
- $config['driver'] = 'RaggettInternalPHP';
- }
- } else {
- $config['driver'] = 'RaggettExternal';
- }
- } else {
- wfDeprecated( '$wgTidyConfig = null and $wgUseTidy = false', '1.26' );
- return false;
- }
- self::$instance = self::factory( $config );
+ self::$instance = self::factory( $wgTidyConfig );
}
return self::$instance;
}
/**
* Create a new Tidy driver object from configuration.
* @see $wgTidyConfig
- * @param array $config
+ * @param array|null $config Optional since 1.33
* @return bool|\MediaWiki\Tidy\TidyDriverBase
* @throws MWException
*/
- public static function factory( array $config ) {
- switch ( $config['driver'] ) {
- case 'RaggettInternalHHVM':
- $instance = new MediaWiki\Tidy\RaggettInternalHHVM( $config );
- break;
- case 'RaggettInternalPHP':
- $instance = new MediaWiki\Tidy\RaggettInternalPHP( $config );
- break;
- case 'RaggettExternal':
- $instance = new MediaWiki\Tidy\RaggettExternal( $config );
- break;
- case 'RemexHtml':
- $instance = new MediaWiki\Tidy\RemexDriver( $config );
- break;
- case 'disabled':
- wfDeprecated( '"disabled" tidy driver', '1.32' );
- return false;
- default:
- throw new MWException( "Invalid tidy driver: \"{$config['driver']}\"" );
- }
- return $instance;
+ public static function factory( array $config = null ) {
+ return new MediaWiki\Tidy\RemexDriver( $config ?? [] );
}
/**
* Set the driver to be used. This is for testing.
* @param MediaWiki\Tidy\TidyDriverBase|false|null $instance
+ * @deprecated Since 1.33
*/
public static function setInstance( $instance ) {
+ wfDeprecated( __METHOD__, '1.33' );
self::$instance = $instance;
}
+++ /dev/null
-<?php
-
-namespace MediaWiki\Tidy;
-
-use MWException;
-
-/**
- * @deprecated since 1.32, use RemexDriver
- */
-abstract class RaggettBase extends TidyDriverBase {
-
- function __construct( $config ) {
- parent::__construct( $config );
-
- // All tidy modes other than remex are deprecated.
- wfDeprecated( __METHOD__, '1.32' );
- }
-
- /**
- * Generic interface for wrapping and unwrapping HTML for Dave Raggett's tidy.
- *
- * @param string $text Hideous HTML input
- * @return string Corrected HTML output
- */
- public function tidy( $text ) {
- $wrapper = new RaggettWrapper;
- $wrappedtext = $wrapper->getWrapped( $text );
-
- $retVal = null;
- $correctedtext = $this->cleanWrapped( $wrappedtext, false, $retVal );
-
- if ( $retVal < 0 ) {
- wfDebug( "Possible tidy configuration error!\n" );
- return $text . "\n<!-- Tidy was unable to run -->\n";
- } elseif ( is_null( $correctedtext ) ) {
- wfDebug( "Tidy error detected!\n" );
- return $text . "\n<!-- Tidy found serious XHTML errors -->\n";
- }
-
- $correctedtext = $wrapper->postprocess( $correctedtext ); // restore any hidden tokens
-
- return $correctedtext;
- }
-
- public function validate( $text, &$errorStr ) {
- $retval = 0;
- $errorStr = $this->cleanWrapped( $text, true, $retval );
- return ( $retval < 0 && $errorStr == '' ) || $retval == 0;
- }
-
- /**
- * Perform a clean/repair operation
- * @param string $text HTML to check
- * @param bool $stderr Whether to read result from STDERR rather than STDOUT
- * @param int|null &$retval Exit code (-1 on internal error)
- * @return null|string
- * @throws MWException
- */
- abstract protected function cleanWrapped( $text, $stderr = false, &$retval = null );
-}
+++ /dev/null
-<?php
-
-namespace MediaWiki\Tidy;
-
-/**
- * @deprecated since 1.32, use RemexDriver
- */
-class RaggettExternal extends RaggettBase {
- /**
- * Spawn an external HTML tidy process and get corrected markup back from it.
- * Also called in OutputHandler.php for full page validation
- *
- * @param string $text HTML to check
- * @param bool $stderr Whether to read result from STDERR rather than STDOUT
- * @param int|null &$retval Exit code (-1 on internal error)
- * @return string|null
- */
- protected function cleanWrapped( $text, $stderr = false, &$retval = null ) {
- $cleansource = '';
- $opts = ' -utf8';
-
- if ( $stderr ) {
- $descriptorspec = [
- 0 => [ 'pipe', 'r' ],
- 1 => [ 'file', wfGetNull(), 'a' ],
- 2 => [ 'pipe', 'w' ]
- ];
- } else {
- $descriptorspec = [
- 0 => [ 'pipe', 'r' ],
- 1 => [ 'pipe', 'w' ],
- 2 => [ 'file', wfGetNull(), 'a' ]
- ];
- }
-
- $readpipe = $stderr ? 2 : 1;
- $pipes = [];
-
- $process = proc_open(
- "{$this->config['tidyBin']} -config {$this->config['tidyConfigFile']} " .
- $this->config['tidyCommandLine'] . $opts, $descriptorspec, $pipes );
-
- // NOTE: At least on linux, the process will be created even if tidy is not installed.
- // This means that missing tidy will be treated as a validation failure.
-
- if ( is_resource( $process ) ) {
- // Theoretically, this style of communication could cause a deadlock
- // here. If the stdout buffer fills up, then writes to stdin could
- // block. This doesn't appear to happen with tidy, because tidy only
- // writes to stdout after it's finished reading from stdin. Search
- // for tidyParseStdin and tidySaveStdout in console/tidy.c
- fwrite( $pipes[0], $text );
- fclose( $pipes[0] );
- while ( !feof( $pipes[$readpipe] ) ) {
- $cleansource .= fgets( $pipes[$readpipe], 1024 );
- }
- fclose( $pipes[$readpipe] );
- $retval = proc_close( $process );
- } else {
- wfWarn( "Unable to start external tidy process" );
- $retval = -1;
- }
-
- if ( !$stderr && $cleansource == '' && $text != '' ) {
- // Some kind of error happened, so we couldn't get the corrected text.
- // Just give up; we'll use the source text and append a warning.
- $cleansource = null;
- }
-
- return $cleansource;
- }
-
- public function supportsValidate() {
- return true;
- }
-}
+++ /dev/null
-<?php
-
-namespace MediaWiki\Tidy;
-
-/**
- * @deprecated since 1.32, use RemexDriver
- */
-class RaggettInternalHHVM extends RaggettBase {
- /**
- * Use the HTML tidy extension to use the tidy library in-process,
- * saving the overhead of spawning a new process.
- *
- * @param string $text HTML to check
- * @param bool $stderr Whether to read result from error status instead of output
- * @param int|null &$retval Exit code (-1 on internal error)
- * @return string|null
- */
- protected function cleanWrapped( $text, $stderr = false, &$retval = null ) {
- if ( $stderr ) {
- throw new \Exception( "\$stderr cannot be used with RaggettInternalHHVM" );
- }
- $cleansource = tidy_repair_string( $text, $this->config['tidyConfigFile'], 'utf8' );
- if ( $cleansource === false ) {
- $cleansource = null;
- $retval = -1;
- } else {
- $retval = 0;
- }
-
- return $cleansource;
- }
-}
+++ /dev/null
-<?php
-
-namespace MediaWiki\Tidy;
-
-/**
- * @deprecated since 1.32, use RemexDriver
- */
-class RaggettInternalPHP extends RaggettBase {
- /**
- * Use the HTML tidy extension to use the tidy library in-process,
- * saving the overhead of spawning a new process.
- *
- * @param string $text HTML to check
- * @param bool $stderr Whether to read result from error status instead of output
- * @param int|null &$retval Exit code (-1 on internal error)
- * @return string|null
- */
- protected function cleanWrapped( $text, $stderr = false, &$retval = null ) {
- if ( !class_exists( 'tidy' ) ) {
- wfWarn( "Unable to load internal tidy class." );
- $retval = -1;
-
- return null;
- }
-
- $tidy = new \tidy;
- $tidy->parseString( $text, $this->config['tidyConfigFile'], 'utf8' );
-
- if ( $stderr ) {
- $retval = $tidy->getStatus();
- return $tidy->errorBuffer;
- }
-
- $tidy->cleanRepair();
- $retval = $tidy->getStatus();
- if ( $retval == 2 ) {
- // 2 is magic number for fatal error
- // https://secure.php.net/manual/en/tidy.getstatus.php
- $cleansource = null;
- } else {
- $cleansource = tidy_get_output( $tidy );
- if ( !empty( $this->config['debugComment'] ) && $retval > 0 ) {
- $cleansource .= "<!--\nTidy reports:\n" .
- str_replace( '-->', '-->', $tidy->errorBuffer ) .
- "\n-->";
- }
- }
-
- return $cleansource;
- }
-
- public function supportsValidate() {
- return true;
- }
-}
+++ /dev/null
-<?php
-namespace MediaWiki\Tidy;
-
-use ParserOutput;
-use Parser;
-
-/**
- * Class used to hide mw:editsection tokens from Tidy so that it doesn't break them
- * or break on them. This is a bit of a hack for now, but hopefully in the future
- * we may create a real postprocessor or something that will replace this.
- * It's called wrapper because for now it basically takes over MWTidy::tidy's task
- * of wrapping the text in a xhtml block
- *
- * This re-uses some of the parser's UNIQ tricks, though some of it is private so it's
- * duplicated. Perhaps we should create an abstract marker hiding class.
- *
- * @ingroup Parser
- * @deprecated since 1.32
- */
-class RaggettWrapper {
-
- /**
- * @var array
- */
- protected $mTokens;
-
- /**
- * @var int
- */
- protected $mMarkerIndex;
-
- /**
- * @param string $text
- * @return string
- */
- public function getWrapped( $text ) {
- $this->mTokens = [];
- $this->mMarkerIndex = 0;
-
- // Replace <mw:editsection> elements with placeholders
- $wrappedtext = preg_replace_callback( ParserOutput::EDITSECTION_REGEX,
- [ $this, 'replaceCallback' ], $text );
- // ...and <mw:toc> markers
- $wrappedtext = preg_replace_callback( '/\<\\/?mw:toc\>/',
- [ $this, 'replaceCallback' ], $wrappedtext );
- // ... and <math> tags
- $wrappedtext = preg_replace_callback( '/\<math(.*?)\<\\/math\>/s',
- [ $this, 'replaceCallback' ], $wrappedtext );
- // Modify inline Microdata <link> and <meta> elements so they say <html-link> and <html-meta> so
- // we can trick Tidy into not stripping them out by including them in tidy's new-empty-tags config
- $wrappedtext = preg_replace( '!<(link|meta)([^>]*?)(/{0,1}>)!', '<html-$1$2$3', $wrappedtext );
- // Similar for inline <style> tags, but those aren't empty.
- $wrappedtext = preg_replace_callback( '!<style([^>]*)>(.*?)</style>!s', function ( $m ) {
- return '<html-style' . $m[1] . '>'
- . $this->replaceCallback( [ $m[2] ] )
- . '</html-style>';
- }, $wrappedtext );
-
- // Preserve empty li elements (T49673) by abusing Tidy's datafld hack
- // The whitespace class is as in TY_(InitMap)
- $wrappedtext = preg_replace( "!<li>([ \r\n\t\f]*)</li>!",
- '<li datafld="" class="mw-empty-elt">\1</li>', $wrappedtext );
-
- // Wrap the whole thing in a doctype and body for Tidy.
- $wrappedtext = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"' .
- ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>' .
- '<head><title>test</title></head><body>' . $wrappedtext . '</body></html>';
-
- return $wrappedtext;
- }
-
- /**
- * @param array $m
- * @return string
- */
- private function replaceCallback( array $m ) {
- $marker = Parser::MARKER_PREFIX . "-item-{$this->mMarkerIndex}" . Parser::MARKER_SUFFIX;
- $this->mMarkerIndex++;
- $this->mTokens[$marker] = $m[0];
- return $marker;
- }
-
- /**
- * @param string $text
- * @return string
- */
- public function postprocess( $text ) {
- // Revert <html-{link,meta,style}> back to <{link,meta,style}>
- $text = preg_replace( '!<html-(link|meta)([^>]*?)(/{0,1}>)!', '<$1$2$3', $text );
- $text = preg_replace( '!<(/?)html-(style)([^>]*)>!', '<$1$2$3>', $text );
-
- // Remove datafld
- $text = str_replace( '<li datafld=""', '<li', $text );
-
- // Restore the contents of placeholder tokens
- $text = strtr( $text, $this->mTokens );
-
- return $text;
- }
-
-}
+++ /dev/null
-# html tidy (http://tidy.sf.net) configuration
-# tidy - validate, correct, and pretty-print HTML files
-# see: man 1 tidy, http://tidy.sourceforge.net/docs/quickref.html
-
-show-body-only: yes
-force-output: yes
-tidy-mark: no
-wrap: 0
-wrap-attributes: no
-literal-attributes: yes
-output-xhtml: yes
-numeric-entities: yes
-enclose-text: yes
-enclose-block-text: yes
-quiet: yes
-quote-nbsp: yes
-fix-backslash: no
-fix-uri: no
-# Don't strip html5 elements we support
-# html-{meta,link} is a hack we use to prevent Tidy from stripping <meta> and <link> used in the body for Microdata
-new-empty-tags: html-meta, html-link, wbr, source, track
-new-inline-tags: video, audio, bdi, data, time, mark
-# html-style is a hack we use to prevent pre-HTML5 versions of Tidy from stripping <style> used in the body for TemplateStyles
-new-blocklevel-tags: html-style
rabdiff
radic
radius
-raggett
raii
raimond
random
'TestFileEditor' => "$testDir/parser/TestFileEditor.php",
'TestFileReader' => "$testDir/parser/TestFileReader.php",
'TestRecorder' => "$testDir/parser/TestRecorder.php",
- 'TidySupport' => "$testDir/parser/TidySupport.php",
# tests/phpunit
'EmptyResourceLoader' => "$testDir/phpunit/ResourceLoaderTestCase.php",
*/
private $dbClone;
- /**
- * @var TidySupport
- */
- private $tidySupport;
-
/**
* @var TidyDriverBase
*/
$this->disableSaveParse = !empty( $options['disable-save-parse'] );
- $this->tidySupport = new TidySupport( !empty( $options['use-tidy-config'] ) );
- if ( !$this->tidySupport->isEnabled() ) {
- $this->recorder->warning(
- "Warning: tidy is not installed, skipping some tests\n" );
- }
-
if ( isset( $options['upload-dir'] ) ) {
$this->uploadDir = $options['upload-dir'];
}
$options->setTimestamp( $this->getFakeTimestamp() );
if ( isset( $opts['tidy'] ) ) {
- if ( !$this->tidySupport->isEnabled() ) {
- $this->recorder->skipped( $test, 'tidy extension is not installed' );
- return false;
- } else {
- $options->setTidy( true );
- }
+ $options->setTidy( true );
}
if ( isset( $opts['title'] ) ) {
if ( isset( $opts['tidy'] ) ) {
// Cache a driver instance
if ( $this->tidyDriver === null ) {
- $this->tidyDriver = MWTidy::factory( $this->tidySupport->getConfig() );
+ $this->tidyDriver = MWTidy::factory();
}
$tidy = $this->tidyDriver;
} else {
# Suppress warnings about running tests without tidy
Wikimedia\suppressWarnings();
wfDeprecated( 'disabling tidy' );
+ wfDeprecated( 'MWTidy::setInstance' );
Wikimedia\restoreWarnings();
MWTidy::setInstance( $tidy );
+++ /dev/null
-<?php
-
-/**
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Testing
- */
-
-/**
- * Initialize and detect the tidy support
- */
-class TidySupport {
- private $enabled;
- private $config;
-
- /**
- * Determine if there is a usable tidy.
- * @param bool $useConfiguration
- */
- public function __construct( $useConfiguration = false ) {
- global $wgUseTidy, $wgTidyBin, $wgTidyInternal, $wgTidyConfig,
- $wgTidyConf, $wgTidyOpts;
-
- $this->enabled = true;
- if ( $useConfiguration ) {
- if ( $wgTidyConfig !== null ) {
- $this->config = $wgTidyConfig;
- } elseif ( $wgUseTidy ) {
- $this->config = [
- 'tidyConfigFile' => $wgTidyConf,
- 'debugComment' => false,
- 'tidyBin' => $wgTidyBin,
- 'tidyCommandLine' => $wgTidyOpts
- ];
- if ( $wgTidyInternal ) {
- $this->config['driver'] = wfIsHHVM() ? 'RaggettInternalHHVM' : 'RaggettInternalPHP';
- } else {
- $this->config['driver'] = 'RaggettExternal';
- }
- } else {
- $this->enabled = false;
- }
- } else {
- $this->config = [ 'driver' => 'RemexHtml' ];
- }
- if ( !$this->enabled ) {
- $this->config = [ 'driver' => 'disabled' ];
- }
- }
-
- /**
- * Returns true if tidy is usable
- *
- * @return bool
- */
- public function isEnabled() {
- return $this->enabled;
- }
-
- public function getConfig() {
- return $this->config;
- }
-}
*/
public function testRemovehtmltagsOnHtml5Tags( $tag, $escaped ) {
$this->hideDeprecated( 'disabling tidy' );
+ $this->hideDeprecated( 'MWTidy::setInstance' );
MWTidy::setInstance( false );
if ( $escaped ) {
*/
public function testRemoveHTMLtags( $input, $output, $msg = null ) {
$this->hideDeprecated( 'disabling tidy' );
+ $this->hideDeprecated( 'MWTidy::setInstance' );
MWTidy::setInstance( false );
$this->assertEquals( $output, Sanitizer::removeHTMLtags( $input ), $msg );
}