From d1ca54da776a6d4f9d618319df5bd27baacc9253 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 12 Feb 2009 14:53:59 -0800 Subject: [PATCH] EPUB Output:Replace newlines and all other whitespace in TOC with simple spaces, as Adobe DE cant handle non space whitespace characters in the TOC. --- src/calibre/ebooks/metadata/ncx.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/ncx.xml b/src/calibre/ebooks/metadata/ncx.xml index 55395805cd..f1e0b3dbb4 100644 --- a/src/calibre/ebooks/metadata/ncx.xml +++ b/src/calibre/ebooks/metadata/ncx.xml @@ -1,6 +1,7 @@ ${'%*s'%(4*level,'')} ${'%*s'%(4*level,'')} - ${'%*s'%(4*level,'')}${np.text} + ${'%*s'%(4*level,'')}${re.sub(r'\s+', ' ', np.text)} ${'%*s'%(4*level,'')} ${'%*s'%(4*level,'')} ${navpoint(np2, level+1)} @@ -28,4 +29,4 @@ from uuid import uuid4 ${navpoint(np, 0)} - \ No newline at end of file +