diff options
author | C. Scott Ananian <cscott@cscott.net> | 2020-04-01 16:51:57 -0400 |
---|---|---|
committer | C. Scott Ananian <cscott@cscott.net> | 2020-04-02 11:53:53 -0400 |
commit | 8c18f2b41ce0b392df4e640a68668f56fe6b2864 (patch) | |
tree | c3202b880ba93bac793c2194a8c22317b33d458a /includes/parser | |
parent | 91e017976567b6d7265dfb56c933223a7307a63c (diff) | |
download | mediawikicore-8c18f2b41ce0b392df4e640a68668f56fe6b2864.tar.gz mediawikicore-8c18f2b41ce0b392df4e640a68668f56fe6b2864.zip |
Add a wfDeprecated to an overlooked code path where parser output is not tidy
We formally deprecated running the parser with tidy disabled in 1.33, but
I missed a hard-deprecation on this code path.
Be careful not to spam the logs with deprecation warnings triggered by
(deprecated) API requests, though.
Change-Id: I10f64e76ec0c5aee8b26fc00bc11ebb0e39f961b
Diffstat (limited to 'includes/parser')
-rw-r--r-- | includes/parser/Parser.php | 2 | ||||
-rw-r--r-- | includes/parser/ParserOptions.php | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 65254c5ac773..6f9aeda77559 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1620,6 +1620,8 @@ class Parser { if ( MWTidy::isEnabled() ) { if ( $this->mOptions->getTidy() ) { $text = MWTidy::tidy( $text ); + } else { + wfDeprecated( 'disabling tidy', '1.33' ); } } else { # attempt to sanitize at least some nesting problems diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index 4a6654a227bf..82fddb88f8f7 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -303,6 +303,9 @@ class ParserOptions { * @return bool Old value */ public function setTidy( $x ) { + if ( !$x ) { + wfDeprecated( 'disabling tidy', '1.33' ); + } return $this->setOptionLegacy( 'tidy', $x ); } |