[epub, mobi] fix for IT #3356 - new line char is problemtic in toc.ncx - replace...
authorRobert Błaut <listy@blaut.biz>
Thu, 27 Feb 2014 16:03:20 +0000 (17:03 +0100)
committerRobert Błaut <listy@blaut.biz>
Thu, 27 Feb 2014 16:03:20 +0000 (17:03 +0100)
librarian/epub.py

index 6377526..b17ca0e 100644 (file)
@@ -249,7 +249,7 @@ class TOC(object):
 
             nav_label = nav_map.makeelement(NCXNS('navLabel'))
             text = nav_map.makeelement(NCXNS('text'))
 
             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)
 
             nav_label.append(text)
             nav_point.append(nav_label)