diff --git a/inc/3rdparty/libraries/PHPePub/EPub.php b/inc/3rdparty/libraries/PHPePub/EPub.php index 836c051..0260ce4 100644 --- a/inc/3rdparty/libraries/PHPePub/EPub.php +++ b/inc/3rdparty/libraries/PHPePub/EPub.php @@ -343,6 +343,7 @@ class EPub { } $fileName = Zip::getRelativePath($fileName); $fileName = preg_replace('#^[/\.]+#i', "", $fileName); + $fileName = $this->sanitizeFileName($fileName); $chapter = $chapterData; if ($autoSplit && is_string($chapterData) && mb_strlen($chapterData) > $this->splitDefaultSize) { @@ -1699,7 +1700,7 @@ class EPub { while (list($chapterName, $navPoint) = each($this->ncx->chapterList)) { $fileName = $navPoint->getContentSrc(); $level = $navPoint->getLevel() -2; - $tocData .= "\t
" . str_repeat(" ", $level) . "" . $chapterName . "
\n"; + $tocData .= "\t" . str_repeat(" ", $level) . "sanitizeFileName($fileName) . "\">" . $chapterName . "
\n"; } } else if ($this->tocAddReferences === TRUE) { if (array_key_exists($item, $this->ncx->referencesList)) {