fix issue with books missing titles
parent
97961ea4f8
commit
1e9e1593d0
|
@ -39,10 +39,13 @@ class CoverPages(object):
|
||||||
for row in rows:
|
for row in rows:
|
||||||
url = '/' + row.filename
|
url = '/' + row.filename
|
||||||
href = '/ebooks/%d' % row.pk
|
href = '/ebooks/%d' % row.pk
|
||||||
|
if row.title:
|
||||||
title = gg.xmlspecialchars (row.title) # handles <,>,&
|
title = gg.xmlspecialchars (row.title) # handles <,>,&
|
||||||
#Shortening long titles for latest covers
|
#Shortening long titles for latest covers
|
||||||
title = title.replace('"', '"')
|
title = title.replace('"', '"')
|
||||||
title = title.replace("'", ''')
|
title = title.replace("'", ''')
|
||||||
|
else:
|
||||||
|
title = '!! missing title !!'
|
||||||
short_title = title
|
short_title = title
|
||||||
title_len = len(title)
|
title_len = len(title)
|
||||||
short_title = re.sub(r"\-+", " ", short_title)
|
short_title = re.sub(r"\-+", " ", short_title)
|
||||||
|
|
Loading…
Reference in New Issue