From: Robert BÅ‚aut Date: Thu, 27 Feb 2014 16:03:20 +0000 (+0100) Subject: [epub, mobi] fix for IT #3356 - new line char is problemtic in toc.ncx - replace... X-Git-Tag: 1.7~99^2~21 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/5ea41f9b810aa661189d3ab8a3cd15b61a3d900f?ds=inline;hp=--cc [epub, mobi] fix for IT #3356 - new line char is problemtic in toc.ncx - replace it with space --- 5ea41f9b810aa661189d3ab8a3cd15b61a3d900f diff --git a/librarian/epub.py b/librarian/epub.py index 6377526..b17ca0e 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -249,7 +249,7 @@ class TOC(object): nav_label = nav_map.makeelement(NCXNS('navLabel')) text = nav_map.makeelement(NCXNS('text')) - text.text = child.name + text.text = re.sub(r'\n', ' ', child.name) nav_label.append(text) nav_point.append(nav_label)