Merge "Use ParserOutput stateless transforms"

This commit is contained in:
jenkins-bot 2017-12-01 04:31:57 +00:00 committed by Gerrit Code Review
commit 9d3194703f

View file

@ -1156,7 +1156,9 @@ abstract class EchoDiscussionParser {
*/
static function getTextSnippet( $text, Language $lang, $length = 150, $title = null ) {
// Parse wikitext
$html = MessageCache::singleton()->parse( $text, $title )->getText();
$html = MessageCache::singleton()->parse( $text, $title )->getText( [
'enableSectionEditLinks' => false
] );
$plaintext = trim( Sanitizer::stripAllTags( $html ) );
return $lang->truncate( $plaintext, $length );
}