From 2a708e72cfb851603014ddd7add26ce392c606f6 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 25 Jan 2014 09:00:52 +0000 Subject: [PATCH] fix html in atom feed titles --- pandora/clip/models.py | 2 +- pandora/item/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora/clip/models.py b/pandora/clip/models.py index a997099f..4f261dca 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -103,7 +103,7 @@ class MetaClip: @property def public_id(self): - return u"%s/%0.03f-%0.03f" %(self.item.itemId, float(self.start), float(self.end)) + return u"%s/%0.03f-%0.03f" % (self.item.itemId, float(self.start), float(self.end)) def __unicode__(self): return self.public_id diff --git a/pandora/item/views.py b/pandora/item/views.py index f7701be9..2b90026e 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -998,7 +998,7 @@ def atom_xml(request): entry = ET.Element("entry") title = ET.SubElement(entry, "title") - title.text = item.get('title') + title.text = ox.decode_html(item.get('title')) link = ET.SubElement(entry, "link") link.attrib['rel'] = 'alternate' link.attrib['href'] = "%s/info" % page_link @@ -1012,7 +1012,7 @@ def atom_xml(request): if item.get('director'): el = ET.SubElement(entry, "author") name = ET.SubElement(el, "name") - name.text = u', '.join(item.get('director')) + name.text = ox.decode_html(u', '.join(item.get('director'))) elif item.user: el = ET.SubElement(entry, "author") name = ET.SubElement(el, "name")