mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TextExtracts
synced 2024-11-23 15:56:52 +00:00
Merge "Replace use of deprecated MWTidy class"
This commit is contained in:
commit
91afe58671
|
@ -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",
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue