From e79453ab5f1d9df6797216f809ab8e9355aba17d Mon Sep 17 00:00:00 2001 From: AaronBenDaniel <144371000+AaronBenDaniel@users.noreply.github.com> Date: Sat, 15 Feb 2025 06:04:28 -0500 Subject: [PATCH] fix(api): Strip control characters from chapter titles (#47) --- src/api/src/create_book.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/src/create_book.py b/src/api/src/create_book.py index f7df013..7add319 100644 --- a/src/api/src/create_book.py +++ b/src/api/src/create_book.py @@ -461,6 +461,7 @@ class EPUBGenerator: for cidx, (part, content) in enumerate(zip(self.data["parts"], contents)): title = part["title"] + title = re.sub(r'[\x00-\x1F\x7F]', '', title) # Remove control characters # Thanks https://eu17.proxysite.com/process.php?d=5VyWYcoQl%2BVF0BYOuOavtvjOloFUZz2BJ%2Fepiusk6Nz7PV%2B9i8rs7cFviGftrBNll%2B0a3qO7UiDkTt4qwCa0fDES&b=1 chapter = epub.EpubHtml(