http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9489
Revision: 9489 Author: xqt Date: 2011-09-03 10:07:18 +0000 (Sat, 03 Sep 2011) Log Message: ----------- revert r5856 due to bug #2989218
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2011-09-03 08:32:33 UTC (rev 9488) +++ trunk/pywikipedia/wikipedia.py 2011-09-03 10:07:18 UTC (rev 9489) @@ -172,8 +172,6 @@ Rwatchlist = re.compile(r"<input tabindex='[\d]+' type='checkbox' " r"name='wpWatchthis' checked='checked'") Rlink = re.compile(r'[[(?P<title>[^]|[]*)(|[^]]*)?]]') -resectiondecodeescapes = re.compile(r".(?=[0-9a-f]{2})",re.I) -resectiondecodeleadingnonalpha = re.compile(r'^x(?=[^a-zA-Z])')
class Page(object): @@ -527,8 +525,7 @@ """ section = self._section if section and decode: - section = resectiondecodeleadingnonalpha.sub('',section) - section = resectiondecodeescapes.sub('%',section) + section = section.replace('.', '%') section = url2unicode(section, self._site) if not underscore: section = section.replace('_', ' ')
pywikipedia-svn@lists.wikimedia.org