Last modified: 2013-10-31 20:08:40 UTC
The Lua code: mw.title.new('Wikipedia talk:Articles for deletion').prefixedText Gives the result: "Wikipedia_talk:Articles for deletion" Most users will be expecting spaces rather than underscores, as that is what is normally used in wikilinks on Wikipedia. Using underscores also causes problems if you try to test for equality between title.nsText and mw.site.namespaces[namespace].name: mw.title.new('Wikipedia talk:Articles for deletion').nsText --> "Wikipedia_talk" mw.site.namespaces['Wikipedia_talk'].name --> "Wikipedia talk" Having these two commands produce different text seems counterintuitive to me. I've posted a related issue at Bug 56216.
The behavior of .nsText is as intended, as it matches Title::getNsText() in PHP. You shouldn't test for equality between .nsText and .name, test .namespace and .id instead.
Change 92887 had a related patch set uploaded by Anomie: Regularize whitespace handling in mw.title https://gerrit.wikimedia.org/r/92887
Change 92887 merged by jenkins-bot: Regularize whitespace handling in mw.title https://gerrit.wikimedia.org/r/92887
Fix is merged. It should be deployed to WMF wikis with 1.23wmf3, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.