mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 11:46:17 +01:00
Handle tags inside NCX description element more gracefully
This commit is contained in:
parent
a7b2d2ab83
commit
3fe8646ec6
1 changed files with 3 additions and 2 deletions
|
|
@ -343,8 +343,9 @@ def _toc_from_navpoint(self, item, toc, navpoint):
|
|||
|
||||
descriptionElement = xpath(child,
|
||||
'descendant::calibre:meta[@name = "description"]')
|
||||
if descriptionElement :
|
||||
description = descriptionElement[0].text
|
||||
if descriptionElement:
|
||||
description = etree.tostring(descriptionElement[0],
|
||||
method='text', encoding=unicode).strip()
|
||||
else :
|
||||
description = None
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue