Make a single colon an invalid title in php and js
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 6 Dec 2013 17:12:24 +0000 (18:12 +0100)
committerKrinkle <krinklemail@gmail.com>
Fri, 6 Dec 2013 17:44:43 +0000 (17:44 +0000)
commitc42684cca9d9035c444312fef220826fa48fc1d7
tree2113d292a38f30a204192bf52fd682ca17c59831
parent6f9ba4d2c4b5d0dd383974bc85fb072167fdf24b
Make a single colon an invalid title in php and js

When secureAndSplit gets a single colon as input, the leading colon
is stripped and produces a title with a empty string. This change makes
that impossible by moving the empty string check to after the substring
removal of the colon.

Bug: 54044
Change-Id: I574168c9ed281c535901c36dea7c179a4e794d20
includes/Title.php
resources/mediawiki/mediawiki.Title.js
tests/phpunit/includes/TitleTest.php
tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js