diff --git a/extension.json b/extension.json index a5c49be..a559a8f 100644 --- a/extension.json +++ b/extension.json @@ -4,7 +4,7 @@ "Max Semenik" ], "requires": { - "MediaWiki": ">= 1.35.0" + "MediaWiki": ">= 1.36.0" }, "url": "https://www.mediawiki.org/wiki/Extension:TextExtracts", "descriptionmsg": "textextracts-desc", diff --git a/includes/TextTruncator.php b/includes/TextTruncator.php index 7126c10..f09999b 100644 --- a/includes/TextTruncator.php +++ b/includes/TextTruncator.php @@ -2,7 +2,7 @@ namespace TextExtracts; -use MWTidy; +use MediaWiki\MediaWikiServices; /** * This class needs to understand HTML as well as plain text. It tries to not break HTML tags, but @@ -102,7 +102,7 @@ class TextTruncator { */ private function tidy( $text ) { if ( $this->useTidy ) { - $text = MWTidy::tidy( $text ); + $text = MediaWikiServices::getInstance()->getTidy()->tidy( $text ); } return trim( $text );