1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-11 07:33:35 +02:00

Moved prepare_string_for_xml to utils.entities.

This commit is contained in:
2021-01-03 19:47:49 +01:00
parent 8be21d878d
commit 018676c026
8 changed files with 45 additions and 49 deletions

View File

@@ -1,19 +1,15 @@
"""
Read content from Haodoo.net pdb file.
"""
import struct
import os
import struct
from ebook_converter import prepare_string_for_xml
from ebook_converter.ebooks.pdb.formatreader import FormatReader
from ebook_converter.ebooks.metadata import MetaInformation
from ebook_converter.ebooks.txt.processor import opf_writer, HTML_TEMPLATE
from ebook_converter.utils import entities
__license__ = 'GPL v3'
__copyright__ = '2012, Kan-Ru Chen <kanru@kanru.info>'
__docformat__ = 'restructuredtext en'
BPDB_IDENT = b'BOOKMTIT'
UPDB_IDENT = b'BOOKMTIU'
@@ -133,7 +129,7 @@ class Reader(FormatReader):
line = '<h1 class="chapter">' + line + '</h1>\n'
title_added = True
else:
line = prepare_string_for_xml(line)
line = entities.prepare_string_for_xml(line)
lines.append('<p>%s</p>' % line)
if not title_added:
lines.insert(0, '<h1 class="chapter">' + title + '</h1>\n')