minor optimization

gutenberg1
eric 2020-08-27 14:59:43 -04:00
parent 08b0adcb97
commit 543cf55fb2
1 changed files with 1 additions and 3 deletions

View File

@ -39,11 +39,9 @@ class CoverPages(object):
for row in rows:
url = '/' + row.filename
href = '/ebooks/%d' % row.pk
title = gg.xmlspecialchars (row.title)
title = gg.xmlspecialchars (row.title) # handles <,>,&
#Shortening long titles for latest covers
title = title.replace('"', '&quot;')
title = title.replace('<', '&lt;')
title = title.replace('>', '&gt;')
title = title.replace("'", '&apos;')
short_title = title
title_len = len(title)