diff --git a/src/calibre/ebooks/txt/input.py b/src/calibre/ebooks/txt/input.py index cce7bea519..b444bf1cf4 100644 --- a/src/calibre/ebooks/txt/input.py +++ b/src/calibre/ebooks/txt/input.py @@ -10,6 +10,7 @@ from calibre.customize.conversion import InputFormatPlugin, OptionRecommendation from calibre.ebooks.txt.processor import convert_basic, convert_markdown, \ separate_paragraphs_single_line, separate_paragraphs_print_formatted, \ preserve_spaces +from calibre import _ent_pat, xml_entity_to_unicode class TXTInput(InputFormatPlugin): @@ -55,6 +56,8 @@ class TXTInput(InputFormatPlugin): if options.preserve_spaces: txt = preserve_spaces(txt) + txt = _ent_pat.sub(xml_entity_to_unicode, txt) + if options.markdown: log.debug('Running text though markdown conversion...') try: