Alex Brollo wrote:
I found a number of troubles when trying to replicate localurl: parser function by python urllib.quote(), with a number of annoying bugs.
Is this correct-complete?
"/wiki/"+urllib.quote(name-of-page.replace(" ","_"),"/!,;:.-_") where name-of-page is utf-8 encoded.
Thanks! I apologyze for so a banal question.
Alex brollo
The relevant function is Title::getLocalURL() I think that in your quote function you need to skip '@$*(),' as well, and ".-_" wouldn't be needed there (but urllib.quote could differ from php urlencode). See wfUrlEncode in GlobalFunctions.php