MOBI Input: Fix regression parsing '

MOBI Input: Fix a regression that broke parsing of MOBI files with
malformed markup that also used entities for apostrophes. Fixes #1197585 [Private bug](https://bugs.launchpad.net/calibre/+bug/1197585)
This commit is contained in:
Kovid Goyal 2013-07-04 09:54:53 +05:30
parent af26c0055c
commit 852bd49453

View File

@ -62,7 +62,7 @@ def _parse(source, beautifulsoup, makeelement, **bsargs):
if makeelement is None:
makeelement = html.html_parser.makeelement
if 'convertEntities' not in bsargs:
bsargs['convertEntities'] = 'html'
bsargs['convertEntities'] = 'xhtml' # Changed by Kovid, otherwise ' is mangled, see https://bugs.launchpad.net/calibre/+bug/1197585
tree = beautifulsoup(source, **bsargs)
root = _convert_tree(tree, makeelement)
# from ET: wrap the document in a html root element, if necessary