From d21e62c6241e46e441e3a917f59195c9c637bf59 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 31 Jul 2022 21:26:10 +0530 Subject: [PATCH] Use the same CSS serialization settings for conversion output as in the editor --- src/calibre/ebooks/oeb/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index b798c0fc13..6c3bfd13ea 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -426,6 +426,8 @@ def serialize(data, media_type, pretty_print=False): if isinstance(data, str): return data.encode('utf-8') if hasattr(data, 'cssText'): + from calibre.ebooks.oeb.polish.utils import setup_css_parser_serialization + setup_css_parser_serialization() data = data.cssText if isinstance(data, str): data = data.encode('utf-8')