wok-6.x view feedparser/stuff/feedparser_utf8_decoding.patch @ rev 16900

libpng: sec. CVE-2011-3048 CVE-2012-3386 & MemLeak fixes,oth.. Up from 1.2.47 to 1.2.51
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Tue Jul 15 02:56:01 2014 +0300 (2014-07-15)
parents
children
line source
1 --- /var/lib/python-support/python2.5/feedparser.py 2008-01-23 20:10:27.000000000 +0100
2 +++ feedparser.py 2008-07-28 11:01:38.000000000 +0200
3 @@ -1455,7 +1455,7 @@
4 # thanks to Kevin Marks for this breathtaking hack to deal with (valid) high-bit attribute values in UTF-8 feeds
5 for key, value in attrs:
6 if type(value) != type(u''):
7 - value = unicode(value, self.encoding)
8 + value = unicode(value, self.encoding, errors='replace')
9 uattrs.append((unicode(key, self.encoding), value))
10 strattrs = u''.join([u' %s="%s"' % (key, value) for key, value in uattrs]).encode(self.encoding)
11 if tag in self.elements_no_end_tag: