From cb97f51108b02d976bbd17b7af019d86a36626c8 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sat, 2 Mar 2024 13:00:50 +0000 Subject: [PATCH] Support composite columns in book jackets. --- src/calibre/ebooks/oeb/transforms/jacket.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/calibre/ebooks/oeb/transforms/jacket.py b/src/calibre/ebooks/oeb/transforms/jacket.py index 0add5bfb72..91d21f7ab3 100644 --- a/src/calibre/ebooks/oeb/transforms/jacket.py +++ b/src/calibre/ebooks/oeb/transforms/jacket.py @@ -375,6 +375,13 @@ def render_jacket(mi, output_profile, else: val = comments_to_html(val) args[dkey] = val + elif dt == 'composite': + val = val or '' + # if the column is marked as containing html, use it + # unchanged. Otherwise treat it as a comment. + if not m.get('display', {}).get('contains_html', False): + val = comments_to_html(val) + args[dkey] = val else: args[dkey] = escape(val) args[dkey+'_label'] = escape(display_name)