Handle empty titles

This commit is contained in:
Sam Ruby 2007-07-15 19:18:16 -04:00
parent 3f764d6466
commit 50aab3005c
3 changed files with 20 additions and 1 deletions

View File

@ -237,7 +237,7 @@ def reconstitute(feed, entry):
links(xentry, entry)
bozo = feed.bozo
if not entry.has_key('title'):
if not entry.has_key('title') or not entry.title:
xentry.appendChild(xdoc.createElement('title'))
content(xentry, 'title', entry.get('title_detail',None), bozo)

View File

@ -0,0 +1,10 @@
<!--
Description: empty title
Expect: title_detail.value == ''
-->
<feed xmns="http://www.w3.org/2005/Atom">
<entry>
<title/>
</entry>
</feed>

View File

@ -0,0 +1,9 @@
<!--
Description: missing title
Expect: title_detail.value == ''
-->
<feed xmns="http://www.w3.org/2005/Atom">
<entry>
</entry>
</feed>