From e7e666e8d2f61e3ef351b5647a634a78c4597420 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 16 Apr 2012 09:23:01 +0530 Subject: [PATCH] ... --- src/calibre/library/server/opds.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/server/opds.py b/src/calibre/library/server/opds.py index cfd0a837f7..465439751c 100644 --- a/src/calibre/library/server/opds.py +++ b/src/calibre/library/server/opds.py @@ -112,8 +112,11 @@ def html_to_lxml(raw): for a in remove: del x.attrib[a] raw = etree.tostring(root, encoding=None) - return etree.fromstring(raw) - + try: + return etree.fromstring(raw) + except: + from calibre.ebooks.oeb.parse_utils import _html4_parse + return _html4_parse(raw) def CATALOG_ENTRY(item, item_kind, base_href, version, updated, ignore_count=False, add_kind=False):