mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-02-22 18:15:49 +01:00
Moved xml_replace_entities to utils.entities.
This commit is contained in:
@@ -6,11 +6,12 @@ import subprocess
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from ebook_converter import CurrentDir, xml_replace_entities
|
||||
from ebook_converter import CurrentDir
|
||||
from ebook_converter.ebooks import ConversionError, DRMError
|
||||
from ebook_converter.ebooks.chardet import xml_to_unicode
|
||||
from ebook_converter.ptempfile import PersistentTemporaryFile
|
||||
from ebook_converter.utils.cleantext import clean_xml_chars
|
||||
from ebook_converter.utils import entities
|
||||
from ebook_converter.utils.ipc import eintr_retry_call
|
||||
|
||||
|
||||
@@ -84,7 +85,7 @@ def pdftohtml(output_dir, pdf_path, no_images, as_xml=False):
|
||||
flags=re.I)
|
||||
raw = re.sub(r'<a href="index.html#(\d+)"', r'<a href="#p\1"',
|
||||
raw, flags=re.I)
|
||||
raw = xml_replace_entities(raw)
|
||||
raw = entities.xml_replace_entities(raw)
|
||||
raw = raw.replace('\u00a0', ' ')
|
||||
|
||||
i.write(raw.encode('utf-8'))
|
||||
|
||||
Reference in New Issue
Block a user