http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11676
Revision: 11676 Author: xqt Date: 2013-06-21 07:27:48 +0000 (Fri, 21 Jun 2013) Log Message: ----------- fix for unicode section headers
Modified Paths: -------------- trunk/pywikipedia/pywikibot/textlib.py
Modified: trunk/pywikipedia/pywikibot/textlib.py =================================================================== --- trunk/pywikipedia/pywikibot/textlib.py 2013-06-19 21:13:37 UTC (rev 11675) +++ trunk/pywikipedia/pywikibot/textlib.py 2013-06-21 07:27:48 UTC (rev 11676) @@ -1075,5 +1075,5 @@ def does_text_contain_section(pagetext, section): section = re.sub('[ _]', '[ _]', section) """Determines whether the page text contains the given section title.""" - m = re.search("=+[ ']*%s[ ']*=+" % re.escape(section), pagetext) + m = re.search("=+[ ']*%s[ ']*=+" % section) pagetext) return bool(m)
pywikipedia-svn@lists.wikimedia.org