diff --git a/RELEASE-NOTES-1.35 b/RELEASE-NOTES-1.35 index 1999074d6b1..5c17b3fbbed 100644 --- a/RELEASE-NOTES-1.35 +++ b/RELEASE-NOTES-1.35 @@ -884,6 +884,8 @@ because of Phabricator reports. * No replacement; MediaHandler provides for customizable media rendering - BeforeParserFetchTemplateAndtitle * Replace with new BeforeParserFetchTemplateAndTitle hook + - ParserBeforeTidy + * Use ParserAfterTidy instead to avoid exposing internal half-parsed state * The accessor/mutator methods Parser::Options(), Parser::OutputType(), and Parser::Title() have been deprecated; use the appropriate Parser::get* or Parser::set* methods instead. diff --git a/docs/hooks.txt b/docs/hooks.txt index d48e79b4098..a782d7b9fd8 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2586,7 +2586,8 @@ TODO: No more strip, deprecated ? &$text: text being parsed [&]$stripState: stripState used (object) -'ParserBeforeTidy': Called before tidy and custom tags replacements. +'ParserBeforeTidy': DEPRECATED since 1.35! +Called before tidy and custom tags replacements. [&]$parser: Parser object being used &$text: actual text diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 1f9def67962..dd44743c3ff 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1654,7 +1654,7 @@ class Parser { $text = $this->mStripState->unstripNoWiki( $text ); if ( $isMain ) { - Hooks::run( 'ParserBeforeTidy', [ &$parser, &$text ] ); + Hooks::run( 'ParserBeforeTidy', [ &$parser, &$text ], '1.35' ); } $text = $this->mStripState->unstripGeneral( $text );