forked from 0x2620/pandora
fix html in atom feed titles
This commit is contained in:
parent
f577c7abb2
commit
2a708e72cf
2 changed files with 3 additions and 3 deletions
|
@ -103,7 +103,7 @@ class MetaClip:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def public_id(self):
|
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):
|
def __unicode__(self):
|
||||||
return self.public_id
|
return self.public_id
|
||||||
|
|
|
@ -998,7 +998,7 @@ def atom_xml(request):
|
||||||
|
|
||||||
entry = ET.Element("entry")
|
entry = ET.Element("entry")
|
||||||
title = ET.SubElement(entry, "title")
|
title = ET.SubElement(entry, "title")
|
||||||
title.text = item.get('title')
|
title.text = ox.decode_html(item.get('title'))
|
||||||
link = ET.SubElement(entry, "link")
|
link = ET.SubElement(entry, "link")
|
||||||
link.attrib['rel'] = 'alternate'
|
link.attrib['rel'] = 'alternate'
|
||||||
link.attrib['href'] = "%s/info" % page_link
|
link.attrib['href'] = "%s/info" % page_link
|
||||||
|
@ -1012,7 +1012,7 @@ def atom_xml(request):
|
||||||
if item.get('director'):
|
if item.get('director'):
|
||||||
el = ET.SubElement(entry, "author")
|
el = ET.SubElement(entry, "author")
|
||||||
name = ET.SubElement(el, "name")
|
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:
|
elif item.user:
|
||||||
el = ET.SubElement(entry, "author")
|
el = ET.SubElement(entry, "author")
|
||||||
name = ET.SubElement(el, "name")
|
name = ET.SubElement(el, "name")
|
||||||
|
|
Loading…
Reference in a new issue