From aada90ac68bcff3fc81bf9be0ec871971e3eb614 Mon Sep 17 00:00:00 2001 From: Addshore Date: Fri, 6 Apr 2018 10:47:47 +0000 Subject: [PATCH] Revert "Default installations to using RemexHtml for tidying" This reverts commit efcef34d3da74613b01a320873bc59e134748183. This is causing failures in CI for extensions Depends-On: If9789a61d52f60882fc2f0226757c9d93e1c6362 Change-Id: I17cf305a951b2bf1f03285b12c3e131abcffd31d --- RELEASE-NOTES-1.31 | 4 ---- includes/DefaultSettings.php | 7 +++---- tests/phpunit/includes/parser/TidyTest.php | 4 ++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index b467449b48..23afa4ffb6 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -31,10 +31,6 @@ production. * (T188472) The 'comma' value for $wgArticleCountMethod is no longer supported for performance reasons, and installations with this setting will now work as if it was configured with 'any'. -* (T185753) MediaWiki now defaults to using RemexHtml to tidy up user input, rather than - being off by default. If you wish to disable HTML tidying entirely, set $wgTidyConfig - to null; if you wish to use the old, deprecated Tidy external binary, both - set $wgTidyConfig to null and also set $wgUseTidy to true. * $wgLogAutopatrol now defaults to false instead of true. === New features in 1.31 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 0a499a3b0b..c000098302 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4270,9 +4270,8 @@ $wgAllowImageTag = false; /** * 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/ + * array to enable an external tool. Dave Raggett's "HTML Tidy" is typically + * used. See https://www.w3.org/People/Raggett/tidy/ * * If this is null and $wgUseTidy is true, the deprecated configuration * parameters will be used instead. @@ -4293,7 +4292,7 @@ $wgAllowImageTag = false; * - tidyBin: For RaggettExternal, the path to the tidy binary. * - tidyCommandLine: For RaggettExternal, additional command line options. */ -$wgTidyConfig = [ 'driver' => 'RemexHtml' ]; +$wgTidyConfig = null; /** * Set this to true to use the deprecated tidy configuration parameters. diff --git a/tests/phpunit/includes/parser/TidyTest.php b/tests/phpunit/includes/parser/TidyTest.php index be5125c7e3..62b84aa129 100644 --- a/tests/phpunit/includes/parser/TidyTest.php +++ b/tests/phpunit/includes/parser/TidyTest.php @@ -55,8 +55,8 @@ MathML; ' should survive tidy' ], [ 'foo', 'foo', ' should survive tidy' ], - [ "foo", 'foo', ' should survive tidy' ], - [ "foo", 'foo', ' should survive tidy' ], + [ "\nfoo", 'foo', ' should survive tidy' ], + [ "\nfoo", 'foo', ' should survive tidy' ], [ $testMathML, $testMathML, ' should survive tidy' ], ]; } -- 2.20.1