mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Interwiki
synced 2024-11-27 15:50:32 +00:00
Trim URL and API URLs when saving interwiki prefixes
Bug: T374771 Change-Id: Iaddf64d3297db33098dd0c56f0661e2ba81f519e
This commit is contained in:
parent
1673b7bfa2
commit
8c6068fe2e
|
@ -298,8 +298,10 @@ class SpecialInterwiki extends SpecialPage {
|
|||
$prefix = $contLang->lc( $prefix );
|
||||
// Fall through
|
||||
case 'edit':
|
||||
$theurl = $data['url'];
|
||||
$api = $data['api'] ?? '';
|
||||
// T374771: Trim the URL and API URLs to reduce confusion when
|
||||
// the URLs are accidentally provided with extra whitespace
|
||||
$theurl = trim( $data['url'] );
|
||||
$api = trim( $data['api'] ?? '' );
|
||||
$local = $data['local'] ? 1 : 0;
|
||||
$trans = $data['trans'] ? 1 : 0;
|
||||
$rows = [
|
||||
|
|
Loading…
Reference in a new issue