On 8/6/06, Saqib Kadri <web(a)saqibkadri.net> wrote:
Does anyone know what all the steps are for the
process of wikifying
(and de-wikifying) a string for URI use? e.g., replacing spaces with
underscores, urlencode()ing, etc.
I assume you want Parser::replaceInternalLinks (strings are processed
differently depending on what they're being processed for). You might
want to check it out for yourself at
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Parser.php?….
It's a bit more involved than just replacing spaces with underscores
and urlencode()ing; in addition to encoding differently for anchors,
you need to handle subpages, prohibited characters, and so on.