diff --git a/includes/MonacoSidebar.php b/includes/MonacoSidebar.php index ea4e575..7deedd0 100644 --- a/includes/MonacoSidebar.php +++ b/includes/MonacoSidebar.php @@ -1,7 +1,10 @@ exists() ) { $link = $line_temp[0]; } - if ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $link ) ) { + $urlUtils = MediaWikiServices::getInstance()->getUrlUtils(); + if ( preg_match( '/^(?:' . $urlUtils->validProtocols() . ')/', $link ) ) { $href = $link; } else { $title = Title::newFromText( $link ); @@ -480,7 +484,8 @@ public function parseSidebarLine( $line ) { $link = $lineTmp[0]; } - if ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $link ) ) { + $urlUtils = MediaWikiServices::getInstance()->getUrlUtils(); + if ( preg_match( '/^(?:' . $urlUtils->validProtocols() . ')/', $link ) ) { $href = $link; } else { if ( empty( $link ) ) { diff --git a/includes/MonacoTemplate.php b/includes/MonacoTemplate.php index a650d1f..41915b4 100644 --- a/includes/MonacoTemplate.php +++ b/includes/MonacoTemplate.php @@ -1,8 +1,12 @@ blankimg( [ 'id' => 'fe_random_img', 'class' => 'sprite random', 'alt' => '' ] ); - $feRandIcon = Html::rawElement( 'a', [ 'id' => 'fe_random_icon', 'href' => Skin::makeSpecialUrl( 'Randompage' ) ], $feRandIcon ); - $feRandLink = Html::rawElement( 'a', [ 'id' => 'fe_random_link', 'href' => Skin::makeSpecialUrl( 'Randompage' ) ], wfMessage( 'viewrandompage' )->escaped() ); + $feRandIcon = Html::rawElement( 'a', [ 'id' => 'fe_random_icon', 'href' => SkinComponentUtils::makeSpecialUrl( 'Randompage' ) ], $feRandIcon ); + $feRandLink = Html::rawElement( 'a', [ 'id' => 'fe_random_link', 'href' => SkinComponentUtils::makeSpecialUrl( 'Randompage' ) ], wfMessage( 'viewrandompage' )->escaped() ); $html .= '