mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:46:52 +02:00
...
This commit is contained in:
parent
ae735b2ea3
commit
042d740593
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ def html2text(html):
|
|||
import re
|
||||
if isinstance(html, bytes):
|
||||
from calibre.ebooks.chardet import xml_to_unicode
|
||||
html = xml_to_unicode(html, strip_encoding_pats=True, resolve_entities=True)
|
||||
html = xml_to_unicode(html, strip_encoding_pats=True, resolve_entities=True)[0]
|
||||
# replace <u> tags with <span> as <u> becomes emphasis in html2text
|
||||
html = re.sub(
|
||||
r'<\s*(?P<solidus>/?)\s*[uU]\b(?P<rest>[^>]*)>',
|
||||
|
|
|
|||
Loading…
Reference in a new issue