summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <icon@fedoraproject.org>2008-12-27 18:43:10 +0000
committerKonstantin Ryabitsev <icon@fedoraproject.org>2008-12-27 18:43:10 +0000
commitb6c9d08945ed401e74f450ca7e4d267e74e176b1 (patch)
tree567aaa38b2ed5b019e78cc33b4bd9869bdccb7fe
parentd7eecaa6fbbed9596f6a0bd0a206cb45365da48d (diff)
downloadpython-feedparser-b6c9d08945ed401e74f450ca7e4d267e74e176b1.zip
python-feedparser-b6c9d08945ed401e74f450ca7e4d267e74e176b1.tar.gz
python-feedparser-b6c9d08945ed401e74f450ca7e4d267e74e176b1.tar.xz
Add patch for a utf8 decoding issue (#477024)
-rw-r--r--feedparser_utf8_decoding.patch11
-rw-r--r--python-feedparser.spec6
2 files changed, 15 insertions, 2 deletions
diff --git a/feedparser_utf8_decoding.patch b/feedparser_utf8_decoding.patch
new file mode 100644
index 0000000..44111b9
--- /dev/null
+++ b/feedparser_utf8_decoding.patch
@@ -0,0 +1,11 @@
+--- /var/lib/python-support/python2.5/feedparser.py 2008-01-23 20:10:27.000000000 +0100
++++ feedparser.py 2008-07-28 11:01:38.000000000 +0200
+@@ -1455,7 +1455,7 @@
+ # thanks to Kevin Marks for this breathtaking hack to deal with (valid) high-bit attribute values in UTF-8 feeds
+ for key, value in attrs:
+ if type(value) != type(u''):
+- value = unicode(value, self.encoding)
++ value = unicode(value, self.encoding, errors='replace')
+ uattrs.append((unicode(key, self.encoding), value))
+ strattrs = u''.join([u' %s="%s"' % (key, value) for key, value in uattrs]).encode(self.encoding)
+ if tag in self.elements_no_end_tag:
diff --git a/python-feedparser.spec b/python-feedparser.spec
index ddae89e..f7b5dc0 100644
--- a/python-feedparser.spec
+++ b/python-feedparser.spec
@@ -9,6 +9,7 @@ Group: Development/Languages
License: BSD
URL: http://feedparser.org/
Source0: http://download.sourceforge.net/feedparser/feedparser-%{version}.zip
+Patch0: feedparser_utf8_decoding.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -24,6 +25,7 @@ modules, including Dublin Core and Apple's iTunes extensions.
%prep
%setup -q -c
+%patch0 -p0 -b .utf8_decoding
find -type f -exec sed -i 's/\r//' {} ';'
find -type f -exec chmod 0644 {} ';'
@@ -50,8 +52,8 @@ rm -rf $RPM_BUILD_ROOT
%changelog
-* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 4.1-5
-- Rebuild for Python 2.6
+* Sat Dec 27 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 4.1-5
+- Patch for a utf8 decoding issue (#477024)
* Wed Sep 3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 4.1-4
- fix license tag