From 2db7ab4a60600a5342fdc5c62c24ea1d99c8669e Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Thu, 10 Oct 2024 16:48:12 +0200 Subject: [PATCH] Remove wfUrlProtocols --- src/Menu/MenuFromLines.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Menu/MenuFromLines.php b/src/Menu/MenuFromLines.php index 635c8e91..b48a3059 100644 --- a/src/Menu/MenuFromLines.php +++ b/src/Menu/MenuFromLines.php @@ -26,6 +26,7 @@ namespace Skins\Chameleon\Menu; +use MediaWiki\MediaWikiServices; use Title; /** @@ -191,7 +192,7 @@ protected function getTextFromMessageName( $messageName ) { protected function getHrefForTarget( $linkTarget ) { if ( empty( $linkTarget ) ) { return '#'; - } elseif ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $linkTarget ) || + } elseif ( preg_match( '/^(?:' . MediaWikiServices::getInstance()->getUrlUtils()->validProtocols() . ')/', $linkTarget ) || $linkTarget[ 0 ] === '#' ) { return $linkTarget; } else {