http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10398
Revision: 10398 Author: xqt Date: 2012-06-21 04:41:39 +0000 (Thu, 21 Jun 2012) Log Message: ----------- convert html entities; fix for bug #3536400
Modified Paths: -------------- trunk/pywikipedia/flickrripper.py
Modified: trunk/pywikipedia/flickrripper.py =================================================================== --- trunk/pywikipedia/flickrripper.py 2012-06-20 22:41:21 UTC (rev 10397) +++ trunk/pywikipedia/flickrripper.py 2012-06-21 04:41:39 UTC (rev 10398) @@ -156,7 +156,8 @@ #find the max length for a mw title maxBytes = 240 - len(project.encode('utf-8')) \ - len(username.encode('utf-8')) - description = photoInfo.find('photo').find('description').text + description = pywikibot.html2unicode( + photoInfo.find('photo').find('description').text) if description: descBytes = len(description.encode('utf-8')) if descBytes > maxBytes:
pywikipedia-svn@lists.wikimedia.org