Merge "Don't run the non-Tidy "bug 2702" hack unless Tidy is really missing"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 27 Jul 2016 18:10:33 +0000 (18:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 27 Jul 2016 18:10:33 +0000 (18:10 +0000)
RELEASE-NOTES-1.28
includes/parser/Parser.php

index 608bc56..5b77ac2 100644 (file)
@@ -85,6 +85,8 @@ changes to languages because of Phabricator reports.
   were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd
   respectively. See docs/hooks.txt for the specific changes needed for those hooks.
 * The 'ParserLimitReportFormat' hook was removed.
+* Disabled "bug 2702" HTML tidying of parsed UI messages on wikis where Tidy is
+  disabled.
 
 == Compatibility ==
 
index e57ec8e..f9eea48 100644 (file)
@@ -1341,8 +1341,10 @@ class Parser {
 
                $text = Sanitizer::normalizeCharReferences( $text );
 
-               if ( MWTidy::isEnabled() && $this->mOptions->getTidy() ) {
-                       $text = MWTidy::tidy( $text );
+               if ( MWTidy::isEnabled() ) {
+                       if ( $this->mOptions->getTidy() ) {
+                               $text = MWTidy::tidy( $text );
+                       }
                } else {
                        # attempt to sanitize at least some nesting problems
                        # (bug #2702 and quite a few others)