mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Interwiki
synced 2024-11-23 14:06:55 +00:00
Replace $wgLegalTitleChars with Title::legalChars()
Bug: T297340 Change-Id: I0828f5d9f6e5c65435c489adab3e161ad1c67873
This commit is contained in:
parent
faf4237dd2
commit
9f9e40cf7a
|
@ -12,6 +12,7 @@ use PermissionsError;
|
|||
use ReadOnlyError;
|
||||
use SpecialPage;
|
||||
use Status;
|
||||
use Title;
|
||||
|
||||
/**
|
||||
* Implements Special:Interwiki
|
||||
|
@ -244,8 +245,7 @@ class SpecialInterwiki extends SpecialPage {
|
|||
// Invalid characters for a title should also be invalid for a prefix.
|
||||
// Whitespace, ':', '&' and '=' are invalid, too.
|
||||
// (Bug 30599).
|
||||
global $wgLegalTitleChars;
|
||||
$validPrefixChars = preg_replace( '/[ :&=]/', '', $wgLegalTitleChars );
|
||||
$validPrefixChars = preg_replace( '/[ :&=]/', '', Title::legalChars() );
|
||||
if ( $do === 'add' && preg_match( "/\s|[^$validPrefixChars]/", $prefix ) ) {
|
||||
$status->fatal( 'interwiki-badprefix', htmlspecialchars( $prefix ) );
|
||||
return $status;
|
||||
|
|
Loading…
Reference in a new issue