Fix exception arising when someone empties the author link template box.

This commit is contained in:
Charles Haley 2011-07-23 16:37:01 +01:00
parent c137537298
commit e0be0d844d

View File

@ -143,6 +143,8 @@ def render_data(mi, use_roman_numbers=True, all_fields=False):
vals['author_sort'] = aut.replace(' ', '+')
link = formatter.safe_format(
gprefs.get('default_author_link'), vals, '', vals)
else:
link = ''
if link:
link = prepare_string_for_xml(link)
authors.append(u'<a href="%s">%s</a>'%(link, aut))