jenkins-bot has submitted this change and it was merged.
Change subject: Fix namespaces when moving across wikis
......................................................................
Fix namespaces when moving across wikis
Spaces should be the only thing not normalised when we reach this page.
Bug: T132071
Change-Id: If77553cc4b26fa52b3221c5781a14b078eb7ce6c
---
M modules/source/ext.cx.source.js
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Santhosh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index 32df675..35d46fd 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -71,7 +71,8 @@
fetchParams = {
$language: this.siteMapper.getWikiDomainCode( language
),
- $title: new mw.Title( title ).getPrefixedDb()
+ // Manual normalisation to avoid redirects on spaces
but not to break namespaces
+ $title: title.replace( / /g, '_' )
};
apiURL = '/page/$language/$title';
--
To view, visit https://gerrit.wikimedia.org/r/284673
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If77553cc4b26fa52b3221c5781a14b078eb7ce6c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits