* @return string
*/
protected function makePageLink( Title $title = null, $parameters = [], $html = null ) {
+ if ( !$title instanceof Title ) {
+ throw new MWException( 'Expected title, got null' );
+ }
if ( !$this->plaintext ) {
- $link = Linker::link( $title, $html, [], $parameters );
+ $html = $html !== null ? new HtmlArmor( $html ) : $html;
+ $link = $this->getLinkRenderer()->makeLink( $title, $html, [], $parameters );
} else {
- if ( !$title instanceof Title ) {
- throw new MWException( "Expected title, got null" );
- }
$link = '[[' . $title->getPrefixedText() . ']]';
}