mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix exception arising when someone empties the author link template box.
This commit is contained in:
parent
c137537298
commit
e0be0d844d
@ -143,6 +143,8 @@ def render_data(mi, use_roman_numbers=True, all_fields=False):
|
|||||||
vals['author_sort'] = aut.replace(' ', '+')
|
vals['author_sort'] = aut.replace(' ', '+')
|
||||||
link = formatter.safe_format(
|
link = formatter.safe_format(
|
||||||
gprefs.get('default_author_link'), vals, '', vals)
|
gprefs.get('default_author_link'), vals, '', vals)
|
||||||
|
else:
|
||||||
|
link = ''
|
||||||
if link:
|
if link:
|
||||||
link = prepare_string_for_xml(link)
|
link = prepare_string_for_xml(link)
|
||||||
authors.append(u'<a href="%s">%s</a>'%(link, aut))
|
authors.append(u'<a href="%s">%s</a>'%(link, aut))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user