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
|
||||||
title = gg.xmlspecialchars (row.title) # handles <,>,&
|
if row.title:
|
||||||
#Shortening long titles for latest covers
|
title = gg.xmlspecialchars (row.title) # handles <,>,&
|
||||||
title = title.replace('"', '"')
|
#Shortening long titles for latest covers
|
||||||
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