*/
public function getCancelLink() {
$cancelParams = [];
+ $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
if ( !$this->isConflict && $this->oldid > 0 ) {
$cancelParams['oldid'] = $this->oldid;
} elseif ( $this->getContextTitle()->isRedirect() ) {
}
$attrs = [ 'id' => 'mw-editform-cancel' ];
- return Linker::linkKnown(
+ return $linkRenderer->makeKnownLink(
$this->getContextTitle(),
- $this->context->msg( 'cancel' )->parse(),
+ new HtmlArmor( $this->context->msg( 'cancel' )->parse() ),
Html::buttonAttributes( $attrs, [ 'mw-ui-quiet' ] ),
$cancelParams
);