Page MenuHomePhabricator

API opensearch cannot find special page with spaces (does not convert underscores in aliases)
Closed, ResolvedPublic


Special page with spaces cannot find by mwsuggest when have the space inside the search term.

For example. Search for "Spezial:Vorlagen expandieren" (Special:ExpandTemplates) on de.wp. After typing "Spezial:Vorlagen e" the scrolldown box is missing.

The problem is, that PrefixIndex::specialSearch get the title without underscores, but the alias is stored with underscore.


Am not sure, which is the best component, so use "General" for now.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:16 PM
bzimport set Reference to bz25675.

(In reply to comment #0)

The problem is, that PrefixIndex::specialSearch get the title without

It is "PrefixSearch::specialSearch"

Created attachment 7763
normalize the search key

The patch normalized the space to underscore, so the alias can be found.

This works, because LocalisationCache also replace spaces to underscore inside aliases.


Please have also a look at bug 25713. Thanks.

mwsuggest.js is the script used before 1.17 to do autocompletion and suggestions in the search bar. The issue named here is not specific to this script but goes for the API that that script uses in general.

Moving bug to API and adjust summary.

Patch looks good, applied on trunk in r82096.