Page MenuHomePhabricator

apprefix parameter ignores spaces at the end
Closed, ResolvedPublic

Description

Author: alexsm333

Description:
See URL above:...&apprefix=Test_ with underscore (could be %20 or +) at the end.

Result: "Test", "Test-Driven", ... (last space is ignored).
Expected: "Test (Unix)", "Test Drive", ...

Looks like the prefix is normalized as if it was a real title, thus loosing extra spaces. Note that [[Special:PrefixIndex]] has the same problem.


Version: 1.13.x
Severity: normal
URL: http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprefix=Test_

Details

Reference
bz15275

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:20 PM
bzimport set Reference to bz15275.

Will try to fix this. As a workaround, you could try apprefix=Test&apfrom=Test_

Reverted in r39938. That was a poor way to 'fix' the bug. It just caused a number of more issues.

The best way to fix this, is probably to pad the title with a single character such as '.' before normalizing it, and then strip that single character off after we're done.

(In reply to comment #3)

Reverted in r39938. That was a poor way to 'fix' the bug. It just caused a
number of more issues.

The best way to fix this, is probably to pad the title with a single character
such as '.' before normalizing it, and then strip that single character off
after we're done.

Fixed again in r40088