From c278f7556c2d0e05814910173b1d224cc04e03bd Mon Sep 17 00:00:00 2001 From: cmdln Date: Wed, 29 Sep 2010 21:31:37 -0400 Subject: [PATCH] Fixed an annoying unicode/ascii issue due to a non-breaking space unicode character getting into the feed. --- append.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/append.py b/append.py index 554b4d0..294321e 100755 --- a/append.py +++ b/append.py @@ -65,6 +65,7 @@ def __append(feed, suffix, append_fn): logging.info('%s is up to date.' % suffix) return + entry.title.encode('ascii') base_url = 'http://www.archive.org/download/%s' % __archive_slug(entry.title) filename = 'cmdln_%s.xml' % suffix today = datetime.date.today() @@ -183,7 +184,7 @@ def __description(content): bare link is added to the last paragraph for the benefit of aggregators that may strip out HTML. """ - description = content[0].value + description = re.sub(u'\xa0', ' ', content[0].value) description = re.sub('

\n', '', description) description = re.sub(re.compile('License.

.*$', re.M | re.S), 'License.

', description) description = re.sub('

\n', '

\n\n', description)