https://bugzilla.wikimedia.org/show_bug.cgi?id=55283
Web browser: --- Bug ID: 55283 Summary: sectionencode incorrectly encoding Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1147/ Reported by: Anonymous user Created on: 2010-03-16 22:21:02 Subject: sectionencode incorrectly encoding Original description: >>> wikipedia.sectionencode(':/', 'utf-8') '.3A/' Which is incorrect as it is ":.2F"
The correct code for sectionencode() should be: return urllib.quote(text.replace(" ","_").encode(encoding), safe=':').replace("%",".")
Also, it would be nice if encoding defaulted here to 'utf-8'