diff --git a/src/calibre/ebooks/txt/textileml.py b/src/calibre/ebooks/txt/textileml.py index 284e4846d9..d7e11695c5 100644 --- a/src/calibre/ebooks/txt/textileml.py +++ b/src/calibre/ebooks/txt/textileml.py @@ -41,7 +41,6 @@ class TextileMLizer(object): html = re.sub(r'<\s*img[^>]*>', '', html) text = html2textile(html) - text = text.replace('%', '') # Ensure the section ends with at least two new line characters. # This is to prevent the last paragraph from a section being diff --git a/src/calibre/utils/html2textile.py b/src/calibre/utils/html2textile.py index 82797a81ad..786e912e36 100644 --- a/src/calibre/utils/html2textile.py +++ b/src/calibre/utils/html2textile.py @@ -77,7 +77,7 @@ class EchoTarget: new_tag = '~' newline = '' elif tag == 'span': - new_tag = '%' + new_tag = '' newline = '' elif tag == 'a': self.block = True @@ -147,7 +147,7 @@ class EchoTarget: elif tag == 'sub': self.final_output.append('~') elif tag == 'span': - self.final_output.append('%') + self.final_output.append('') elif tag == 'a': if self.a_part['title']: textilized = ' "%s (%s)":%s ' % (