Skip to content

Commit

Permalink
Remove wfUrlProtocols
Browse files Browse the repository at this point in the history
  • Loading branch information
malberts committed Oct 10, 2024
1 parent 92f595c commit 2db7ab4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Menu/MenuFromLines.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Skins\Chameleon\Menu;

use MediaWiki\MediaWikiServices;
use Title;

/**
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 2db7ab4

Please sign in to comment.