Stop doing "new MediaWikiTitleCodec()"
JCSingleton::parseTitle() is going to a lot of trouble to disable most
of the logic and configurability in MediaWikiTitleCodec. It is actually
simpler to just duplicate the bits we need here. 95 lines added and 127
removed, including removal of a troublesome integration with core that
uses an unstable interface.
It could be simpler still -- most of this could be combined into a
single regex. Probably some of the normalization is not really needed,
for example, it could reject bidi control characters instead of
stripping them. I'm just trying to follow the structure of core so that
the reviewer can see that no functional changes were made.
Change-Id: I47e83e95727e6830500e9af7cff92e7d3f91167e
2 files changed