Conversion: Fix regression in 5.10 that broke conversion when inserting metadata and using custom long text columns

This commit is contained in:
Kovid Goyal 2021-01-22 20:03:24 +05:30
parent bff0582ec5
commit 3d202a730a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -340,8 +340,7 @@ def render_jacket(mi, output_profile,
args[dkey] = rating_to_stars(mi.get(key), m.get('display', {}).get('allow_half_stars', False))
elif dt == 'comments':
val = val or ''
display = m.get('display', {})
ctype = display.get('interpret_as') or 'html'
ctype = m.get('display', {}).get('interpret_as') or 'html'
if ctype == 'long-text':
val = '<pre style="white-space:pre-wrap">%s</pre>' % escape(val)
elif ctype == 'short-text':